I experience this:

<Py_ssize_t>np.sqrt(some_float64)
 => TypeError: 'numpy.float64' object cannot be interpreted as an index

However
 a) <int>np.sqrt(...) works fine, as does <long> and <long long>.
 b) In Python, int(np.sqrt(...)) and long(np.sqrt(...)) both works fine

Is Py_ssize_t "special" when it comes to converting from Python objects? 
If so I find it mildly confusing and something which only increases 
learning curve...

Dag Sverre
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to