Description
A Block
is basically an Array with mgr_locs
attached. An Index
is basically an Array with some fancy indexing and set operations. These should share a bunch of their code.
Block.make_block
behaves essentially the same way as Index._shallow_copy
. blocks.make_block
behaves like Index.__new__
. Some values
vs _values
vs _ndarray_values
vs _data
juggling may be needed to combine these implementations.
For standard dtypes (float, int, uint, ...) these EAs can be thin wrappers around the numpy implementations.
Aside from de-duplicating a bunch of code, this would allow us to standardize on conventions like ".values
always returns an EA".
The only change I envision to EA is that this would entail needing to support 2D arrays (which I'd prefer anyway...).