Re: [Numpy-discussion] Type declaration to include all valid numerical NumPy types for Cython

2020-08-09 Thread Eric Moore
If that is really all you need, then the version in python is: def convert_one(a): """ Converts input with arbitrary layout and dtype to a blas/lapack compatible dtype with either C or F order. Acceptable objects are passed through without making copies. """ a_arr =

[Numpy-discussion] Type declaration to include all valid numerical NumPy types for Cython

2020-08-09 Thread Ilhan Polat
Hi all, As you might have seen my recent mails in Cython list, I'm trying to cook up an input validator for the linalg.solve() function. The machinery of SciPy linalg is as follows: Some input comes in passes through np.asarray() then depending on the resulting dtype of the numpy array we choose