by Angel Leon. March 17, 2015;
Last update on December 14, 2023
Updated on February 27, 2023
Updated August 29, 2019.
| """example of converting a numpy array to a C++ valarray and back in cython | |
| using copies. | |
| Compile with `python setup.py build_ext --inplace` | |
| Example | |
| ------- | |
| >>> import cpptest, numpy as np | |
| >>> x = np.array([0., 1., 2.]) |