astropy icon indicating copy to clipboard operation
astropy copied to clipboard

`ilshift` structured-unit should share memory

Open nstarman opened this issue 3 years ago • 0 comments

Followup to https://github.com/astropy/astropy/pull/13638

For a structured array, the self.unit._to(other) will fail; in principle, we can indeed work on the view for that case too, but it needs more work. Note that it didn't really work on the view before either: it just calculated the new value and overrode the view with that. To do better, one would need a version of _recursively_apply with multiple factors. Out of scope here, I think!

Originally posted by @mhvk in https://github.com/astropy/astropy/issues/13638#issuecomment-1245672536

nstarman avatar Sep 14 '22 15:09 nstarman