-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Description
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, but io.fits
still uses it for FITS tables. This is especially important in supporting FITS ASCII tables, for its ability to automatically rstrip()
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 my encoded_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. Similarly isinstance(..., chararray)
checks should raise a deprecation warning (that the class will no longer be a chararray subclass after long).