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
Numpy 2.0 is becoming much more explicit with how scalars are represented. In most cases, we can just adjust our docs - see #15065 - but some become decidedly ugly, and we should change our default __str__ and __repr__. Specific cases:
StructuredUnit. Some of its properties such as .physical_type return a np.void structure. This used to be represented as
Which is not very useful. @nstarman's suggestion in #15065 (comment) is to make __str__ look like the old repr and create a new __repr__ that at the very least corrects the name to astropy.units.Structure. Since for those Structure, the dtype is always object, that information can be omitted as well, in which case it would become,
I think in-scope is only representations of our own classes which have changed due to the numpy 2.0 changes. I think this is mostly subclasses of np.void...
Activity
pllim commentedon Jan 3, 2024
This sounds like a lot of work if we are going to also cover things like
io.fitsandwcs. What is the scope of this issue?mhvk commentedon Jan 4, 2024
I think in-scope is only representations of our own classes which have changed due to the numpy 2.0 changes. I think this is mostly subclasses of
np.void...pllim commentedon Jan 4, 2024
I remember seeing WCS print being ugly while I had numpy 2.0.dev installed but I am not sure if I want to fix it lol.