Remove use of numpy structured arrays in table operations - #3179
Conversation
|
By moving the low-level code into |
|
@taldcroft - very nice! For the Otherwise, 👍 from me! |
|
In anticipation of no objections I've put in the deprecation warnings. |
There was a problem hiding this comment.
What should be the alternative to using these? Is it worth mentioning one?
There was a problem hiding this comment.
Even if the alternative is just "don't use these because they were only meant to support functionality that no longer exists" :)
There was a problem hiding this comment.
By design there is no real astropy dependency in np_utils.py, so it can be ripped out quite easily if needed. So two options are:
- Copy
np_utils.py(and_np_utils.pyx) to your project and use it. - Ask the astropy devs about making this into a standalone package.
I don't know exactly how to say this in a deprecation message.
|
@embray - something like this good enough? |
|
Works for me--I absolutely agree it seems unlikely to ever be an issue though. |
Remove use of numpy structured arrays in table operations
PR #2790 did not address the high-level table operations
hstack,vstack, andjoin. These are implemented in two-tiered approach: the low-level tier innp_utils.pyused pure numpy structured arrays to do the heavy lifting while the high-leveloperations.pyprovided the Table interface. The problem after #2790 is that these operations required creating temporary numpy structured arrays to represent the tables.This PR updates the low-level code to do the operations directly with Table objects and largely eliminates use of numpy structured arrays.
In the current version of the PR, the module
np_utils.pyis basically orphaned, at least from the Table perspective. The functions there were nominally public so we need to decide whether to deprecate them or just leave as a useful utility.