Home My Page Projects py.ml
Summary Activity Tracker SCM

[#21455] No easy way to convert to/from complex128 numbers

Date:
2017-09-14 21:48
Priority:
3
State:
Open
Submitted by:
Ilias Garnier (igarnier)
Assigned to:
Nobody (None)
Summary:
No easy way to convert to/from complex128 numbers

Detailed description
It seems there is no direct way to convert to and from numpy's complex128 complex numbers and ocaml ones. To be precise, I am interested in unpickling complex128 numpy arrays into bigarrays. As far as I understand, the only way to proceed right now is to run through all elements of the unpickled Numpy array one by one and using their 'real' and 'imag' attributes to extract their components, which is ok for small arrays but rather inconvenient.

Such a feature would be hugely appreciated.

Add A Comment: Notepad

Message  ↓
Date: 2017-09-16 13:26
Sender: Thierry Martinez

Thank you for your comment: you gave me the motivation to improve the Numpy support that was needed for a long time. The master version now provides a Numpy module that implements the conversions from Numpy arrays to bigarrays and conversely.

No Changes Have Been Made to This Item