After reading the docs, it turns out that `np.PyArray_FROM_OTF(a,
np.NPY_LONG, np.NPY_ARRAY_FORCECAST) != np.PyArray_FROM_O(a)` prevents the
error from occurring.
--
Sent from: http://numpy-discussion.10968.n7.nabble.com/
___
NumPy-Discussion mailing
Hi All,
Is there a C-API analogue for `np.asarray(a, dtype=int) != np.asarray(a)`
assuming that `a` is an array or python sequence object of whole numbers but
is assigned the float type (e.g a=array([1., 2., 3.]) or [1., 2., 3.])? I
tried `np.PyArray_FROM_OT(a, np.NPY_LONG) != np.PyArray_FROM_O(a)