[Numpy-discussion] how to work with numpy.int8 in c

Christopher Barker Chris.Barker at noaa.gov
Tue Mar 2 15:09:40 EST 2010


James Bergstra wrote:
> Maybe I'm missing something... but I don't think I want to create an array.
> 
> In [3]: import numpy
> 
> In [4]: type(numpy.int8())
> Out[4]: <type 'numpy.int8'>
> 
> In [5]: isinstance(numpy.int8(), numpy.ndarray)
> Out[5]: False

right, it's a type object:

In [13]: type(np.uint8)
Out[13]: <type 'type'>

> I want to create one of those numpy.int8 guys.

There's got to be a a way, though I can't tell you what it is. But I'm 
curious why you want that from C. It's a Python object, why not create 
it in Python?

-Chris





-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris.Barker at noaa.gov



More information about the NumPy-Discussion mailing list