You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've started playing around with enlib and love how it inherits from numpy. But sometimes, the enlib-ness of a map gets stripped away when I pass it to a ufunc. For example:
This isn't necessary for all functions. For example np.sum works fine and preserves the subclass. The problem is functions that clobber the subclass, for example by using np.asarray instead of np.asanyarray. I don't know of any way to make these functions behave, other than adding thousands of wrappers for them in enmap, and avoiding that was the main reason for making enmap a subclass in of ndarray in the first case.
If you have an idea for a better way of doing this, I'd love to hear it.
I've started playing around with enlib and love how it inherits from numpy. But sometimes, the enlib-ness of a map gets stripped away when I pass it to a ufunc. For example:
How can we prevent this? My workaround right now is to do something like:
to allow it to retain its wcs.
The text was updated successfully, but these errors were encountered: