New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deprecate use of chararray in io.fits #3862
Comments
Don't think this will happen for 1.1 so removing milestone |
Hmm did numpy 2.0 already forced our hands in this issue (maybe #15363 ) or not? |
@pllim I don't think so. In fact, numpy 2.0 has received some attention in that area. For instance:
Besides, |
I think the idea is still that we'd slowly stop using |
As raised in #3854 and earlier issues, Numpy is gradually trying to deprecate and eventually kill off the old Numarray
chararray
class. This is fine, butio.fits
still uses it for FITS tables. This is especially important in supporting FITS ASCII tables, for its ability to automaticallyrstrip()
individual strings returned from the array.However, for FITS data we can just use our own class that has this capability (we don't need any of the other
chararray
methods). It might be nice to go ahead and use some version of myencoded_text_array
class for FITS string columns (and possible string columns in other Astropy tables), and to add optional rstrip support to that class (it already has automatic rstripping, but that should probably be optional).I think for backwards compat the new class should inherit
chararray
methods, but they would all raise deprecation warnings. Similarlyisinstance(..., chararray)
checks should raise a deprecation warning (that the class will no longer be a chararray subclass after long).The text was updated successfully, but these errors were encountered: