[Numpy-discussion] how to recognize a numpy-scalar type at the C level and how to convert

Travis Oliphant oliphant at ee.byu.edu
Fri Jan 19 20:24:16 EST 2007


Sebastian Haase wrote:

>Hi again,
>I finally bought the numpy-book.
>Browsing through the 370 pages I found this:
>PyArray IsScalar (op, cls)
>Evaluates true if op is an instance of Py<cls>ArrType Type.
>
>Is this what I need to check for a given scalar type.
>  
>
Yes.   Remember that cls can be a "Generic Class" as well to test for 
Integers, Floats, etc.

-Travis




More information about the NumPy-Discussion mailing list