Skip to content

Copying an Iris cube list? #5140

Answered by trexfeathers
P-Burns asked this question in Q&A
Discussion options

You must be logged in to vote

This was discussed in #3651, and it was decided that CubeList should behave as close to list as possible. As such, if you want the members of the new CubeList to be truly different from the originals, you need to use deepcopy(). See this Stack Overflow answer.

from copy import deepcopy

new_cube_list = deepcopy(my_cube_list)

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by trexfeathers
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants