Lazy dtype update#1502
Conversation
|
Looks like you've rescued all the right changes from my old PR. Re-reading all the old comments it never really got finalised, so there are still a couple of issues to sort out. For example, updating the LazyArray repr. And ideally the new argument to LazyArray would be optional so it remains backwards compatible - I'm not sure how feasible that is though. |
Thanks to stackoverflow and some googling 😜
Something like this? def __repr__(self):
return '<LazyArray(shape={}, dtype={})>'.format(self.shape, self.dtype)
I do not understand iris enough to know if this is possible (probably not, right?): def __init__(self, shape, func, dtype=None):How bad it is to change the API for |
It's not used within Iris, but as it's technically part of the public API it could be used in user code. We're trying to be good citizens and avoid the risk of breaking code where possible. I've sent you ocefpaf#1 which makes it optional (and tweaks the repr). |
Make LazyArray dtype optional
There was a problem hiding this comment.
Note to self: this is odd! Why switch? There's already a file for testing build_dimension_coordinate.
There was a problem hiding this comment.
Looks like some strangeness here, and while we're making notes, it would be nice to fix the typo: auxilliary -> auxiliary.
There was a problem hiding this comment.
I suspect the problem crept in because e2d8569 has a merge conflict with the current master.
@rhattersley Is this just a matter of renaming it back to |
|
Question: In Should both make use of biggus? I tried copying the same logic and rebase against the latest master (that has the new vertical ocean coordinates) but failed with Notebook: http://nbviewer.ipython.org/gist/ocefpaf/4fe047bdaeb4a627d4a0 PR: #1533 |
For now I'd avoid the extra complexity of using biggus for dimension coordinates. If it becomes a problem we can reconsider. But dimension coordinates are limited to 1-dimension, so they don't grow as a large as the auxiliary coordinates. |
|
@rhattersley, pleading for help here. We can't use the official SciTools Iris for many of our workflows until this is merged -- it just blows memory. Here's an example of a notebook that won't run for you, but does run for us with our "custom" Iris version: |
I've attempted to pull everything together and fix the weird test issue mentioned above. It's now in #1560. I think that gives us a decent candidate for merging with all the known issues addressed. |
Fix for #1287, replaces #1290 and #1291.
Demo notebook:
http://nbviewer.ipython.org/gist/ocefpaf/4c81ca2d4a86c69e2026
@rhattersley Not sure if I merged things correctly. A quick test with my dataset works 😁 though.