Replies: 5 comments
-
xarray and pandas both go for the library-level function approach for this sort of operation, Ref. http://xarray.pydata.org/en/stable/user-guide/combining.html So if we did something like that our API may be familiar to users of those libraries. No idea on the cubelist printing though! As a somewhat advanced python programmer and occasional user of iris I find the cubelist printout to be confusing, at is at odds with how lists work in my mental model of python list printing. But that is not necessarily a general view. |
Beta Was this translation helpful? Give feedback.
-
We could default |
Beta Was this translation helpful? Give feedback.
-
I've just been playing and found that, in Perhaps a utility function could be provided to print what currently comes from If I'm working with a new data set, pretty much the first thing I'll do is load a whole file into |
Beta Was this translation helpful? Give feedback.
-
I think I should repeat my assertion from #3429 (comment), #3429 (comment) that this kind of change is going to create a lot of work for users in updating existing code. We should consider whether it's worth it and/or whether there are ways to help make those changes less time consuming. |
Beta Was this translation helpful? Give feedback.
-
Discussion from @SciTools/peloton: We have two types of confusion:
Would the breaking changes be worth it? There would be a lot of them - is the reduction in confusion worth it? |
Beta Was this translation helpful? Give feedback.
-
I've been wondering about the value of CubeList, since
I accept that the CubeList is only an "enhanced list", and this should be easy to use and undertand. But from experience with other users' code in support queries, it actually does confuse (see below)
So I think it's worth considering retire Cubelist + not have it at all
Here are some reasons ...
Noted that
e.g. (and perhaps especially) iris.save, as in
save(CubeList(cubes), file)
e.g.
list_of_cubes = list(cubelist); cube_3 = list_of_cubes[3]
So, it does do a few things..
'Extract' and the like could very easily be provided by a library-level functions.
E.G.
IMHO this is actually simpler than the CubeList way, and clearer.
The printout problem is a little harder.
I don't see how you can get the same convenience of
>>> cubes
.Any ideas ?
Beta Was this translation helpful? Give feedback.
All reactions