-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Complex magnitudes and other non floats #146
Comments
Xref #139 |
Ah thanks, that's very similar. MichaelTiemannOSC@b5954fd#diff-3181ac97c806b62303f85f408bb9a556bdf5f61171d45ccc87df59a3c3adf6a5R228 would have to change. Why is the casting there at all? Can't self._data be a numpy array with dtype O if need be? |
I also think you have to fix MichaelTiemannOSC@b5954fd#diff-3181ac97c806b62303f85f408bb9a556bdf5f61171d45ccc87df59a3c3adf6a5R337 |
I'm not super familiar with the pint pandas code, but could give making a PR a try if you want, unless you can just whip that up super easily? |
My projections implementation and example code: |
@redhog I couldn't follow your comments into the diff, but I'm happy to make whatever changes. I've very new to the pint communities and have no pride of authorship (yet). |
Ideally, for a solution that works for all types, we'd want
PRs that help tackle these issues are welcomed! |
I second Andrew's encouragement to (1) solve the NA problems, so we are not stuck resorting to float NaNs to represent NA data, and (2) to avoid object dtype, not only because of speed/memory efficiency, but once something becomes and object_dtype, it loses all the wonderful properties of Extension Arrays. |
Made a PR that solves this that I think works, but it might break some assumptions I'm not aware of... |
PintArray does not currently support magnitudes of any other type than float. This includes complex numbers, so storing e.g. complex frequencies or I/Q values is not possible. Other compound types have the same problem: I started experimenting with storing coordinates with associated CRS (epsg codes) as pint values which works fine (including reprojection in context converters), but they can't go in a PintArray either :(
The text was updated successfully, but these errors were encountered: