Remove __array__ interface
- [ ] Closes https://github.com/hgrecco/pint-pandas/issues/174
- [x] Executed
pre-commit run --all-fileswith no errors - [x] The change is fully covered by automated unit tests
- [ ] ~Documented in docs/ as appropriate~
- [ ] Added an entry to the CHANGES file
In hunting down options to address https://github.com/hgrecco/pint-pandas/issues/174 , the only solution i found so far to reliably work was to get rid of the __array__ interface entirely, as a more extreme version of the discussion in https://github.com/hgrecco/pint/issues/1128 .
I was quite surprised to learn that nothing in pint directly depends on the interface, but i guess it would be too much of a breaking change. Nevertheless, I like the idea of pint not ever implictly stripping units.
More realistically this means a proper implementation of the __array_ufunc__ alternative might solve at least the linked issue.
I guess you all are exhausted by these discussion already, sorry that i am pbb missing all the basics.
This is interesting, the main issues we've had previously was due to a pint scalar Q(1,"m") being treated as iterable since it has a iter method, which pandas looked for to determine whether an object was array like. The iter would fail, but pandas was checking whether it exsists not whether it fails.
This is interesting as you've removed array not iter.
can close this since reductions now work for pint-pandas