8000 Deprecate use of chararray in io.fits · Issue #3862 · astropy/astropy · GitHub
[go: up one dir, main page]

Skip to content
Deprecate use of chararray in io.fits #3862
@embray

Description

@embray

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).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0