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

Travis Oliphant oliphant at enthought.com
Tue Mar 2 20:51:45 EST 2010


PyArray_Scalar

Is the one you want.

Travis

--
(mobile phone of)
Travis Oliphant
Enthought, Inc.
1-512-536-1057
http://www.enthought.com

On Mar 2, 2010, at 6:46 PM, James Bergstra <bergstrj at iro.umontreal.ca>  
wrote:

> On Tue, Mar 2, 2010 at 7:32 PM, David Warde-Farley  
> <dwf at cs.toronto.edu> wrote:
>>
>> On 2-Mar-10, at 7:23 PM, James Bergstra wrote:
>>
>>> Sorry... again... how do I make such a scalar... *in C* ?  What  
>>> would
>>> be the recommended C equivalent of this python code?  Are there C
>>> type-checking functions for instances of these objects?  Are there C
>>> functions for converting to and from C scalars?
>>>
>>> Basically, is there a C API for working with these numpy scalars?
>>
>>
>> This bit looks relevant:
>>
>> http://projects.scipy.org/numpy/browser/trunk/numpy/core/src/multiarray/scalarapi.c?rev=7560#L565
>>
>> David
>
> Thanks David, that does look relevant!  Thanks for the tip.
>
> James
> -- 
> http://www-etud.iro.umontreal.ca/~bergstrj
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion at scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion



More information about the NumPy-Discussion mailing list