BUG: Casting tz-aware DatetimeIndex to object-dtype ndarray/Index by jbrockmendel · Pull Request #23524 · pandas-dev/pandas (original) (raw)
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, yes, that's already a generic test. OK, since that does not actually test the return dtype, it's good to have more explicit tests here.
Should we expect from EA that np.array(EA, dtype=object)
always works (returns an object array of scalars)?
That seems like an OK assumption to me, since this already happens if you don't implement __array__
, so we can expect this as well if the EA author implements a custom __array__
I think.