-
-
Notifications
You must be signed in to change notification settings - Fork 6
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 number support #9
Comments
Good catch. The C data type for My first thought is to create another specialised subclass just like the one we have for Numpy arrays, but on the other hand, I'm also wondering how often the need for complex numbers will come up? |
I need it quite often. For example, if you are working in a 2D space and can represent your vectors as complex numbers. |
I don't suppose you would consider taking a crack at implementing a "QuantityComplex", in a similar way to how https://github.com/cjrh/misu/blob/master/misu/engine.pyx#L582 Further up in the file, the A tricky problem will be: how to deal with this type of coercion inside QuantityNP? It turns out that there is indeed a The design of the current code in I really do need to work on misu again sometime. I still want to add error propagation, for example, but I just haven't had time. |
I will play with misu in the coming days and see if it is possible to fully replace python-quantities in the codebase of the company I work with, since python-quantities is so slow and we have lots of quantities in our codebase. Since, I don't think that its too costly, I'll try to implement support for complex scalars. Great project! |
Awesome, thanks. As you work, add tests too. Tests are enormously valuable. |
It is not possible to define quantites of complex numbers:
The text was updated successfully, but these errors were encountered: