Closed hakonanes closed 2 months ago
I've gotten one 👍🏻, so I'm going for it
@hakonanes That would be fantastic! I think @ericpre would also be very happy :)
I certainly will be very happy. I assume the speed trade-off is significant, but the documentation can be marked up to reflect that.
I certainly will be very happy. I assume the speed trade-off is significant, but the documentation can be marked up to reflect that.
I think it's a factor of 2 is what @hakonanes said. I feel that is pretty minimal, there are other places in orix
where it would be easier to speed things up if we really needed it.
Recently released numpy-quaternion 2024.0.2 is compatible with NumPy 2. However, I suggest we keep numpy-quaternion as an optional dependency. Rather, we should try to make more dependencies optional!
I see numpy-quaternion has become a NumPy-2.0-transition-bottleneck downstream for pyxem (https://github.com/pyxem/pyxem/issues/1099). There's discussion of our use of this package in https://github.com/pyxem/orix/issues/506 and https://github.com/pyxem/orix/pull/507.
I suggest to make numpy-quaternion an optional dependency.
We use numpy-quaternion for three operations:
All places for speed, not for functionality. We had implementations of these things without numpy-quaternion before. We can re-introduce these computations as a fall-back if numpy-quaternion is unavailable.
As an added bonus to this work, I want to make it easier to make dependencies in orix optional. numpy-quaternion is a good place to start.
We can do this fairly quickly. If interest, we can make a v0.13.1 patch release.