Bill Spotz wrote:
>On Sep 28, 2006, at 12:03 PM, Travis Oliphant wrote:
>
>
>
>>The other option is to improve your converter in setElements so
>>that it
>>can understand any of the array scalar integers and not just the
>>default
>>Python integer.
>>
>>
>
>I think this may be the best a
On Sep 28, 2006, at 12:03 PM, Travis Oliphant wrote:
> The other option is to improve your converter in setElements so
> that it
> can understand any of the array scalar integers and not just the
> default
> Python integer.
I think this may be the best approach.
This may be something worthwh
Bill Spotz wrote:
> I am wrapping code using swig and extending it to use numpy.
>
> One class method I wrap (let's call it myElements()) returns an array
> of ints, and I convert it to a numpy array with
>
> PyArray_SimpleNew(1,n,'i');
>
You should probably use NPY_INT instead of 'i' fo
I am wrapping code using swig and extending it to use numpy.
One class method I wrap (let's call it myElements()) returns an array
of ints, and I convert it to a numpy array with
PyArray_SimpleNew(1,n,'i');
I obtain the data pointer, fill in the values and return it as the
method return