[Numpy-discussion] Question about bounds checking

2009-08-10 Thread Rich E
Dear all, I am having a few issues with indexing in numpy and wondered if you could help me out. If I define an array a = zeros(( 4)) a array([ 0., 0., 0., 0.]) Then I try and reference a point beyond the bounds of the array a[4] Traceback (most recent call last): File stdin, line 1, in

Re: [Numpy-discussion] default float type of array not accepted by SWIG wrapped C functions

2009-02-06 Thread Rich E
directive you use and and example of python code accessing it? -Bill From: numpy-discussion-boun...@scipy.org [numpy-discussion-boun...@scipy.org] On Behalf Of Rich E [reakina...@gmail.com] Sent: Thursday, January 22, 2009 11:45 AM To: Discussion

Re: [Numpy-discussion] help with typemapping a C function to use numpy arrays

2009-01-09 Thread Rich E
on a different system! In all this, not sure where is best to put the %exception statement, but placement shouldn't be critical, because it concerns the my_ function rather than the original (or renamed) sms_ function. Regards, Egor On Fri, Jan 9, 2009 at 5:43 AM, Rich E reakina...@gmail.com wrote

Re: [Numpy-discussion] help with typemapping a C function to use numpy arrays

2009-01-07 Thread Rich E
, Matthieu Brucher matthieu.bruc...@gmail.com wrote: 2009/1/6 Rich E reakina...@gmail.com: This helped immensely. I feel like I am getting close to being able to accomplish what I would like with SWIG: producing a python module that can be very 'python-like', while co-existing with the c library

Re: [Numpy-discussion] help with typemapping a C function to use numpy arrays

2009-01-05 Thread Rich E
, 1, 2, 2, 3, 3, 4, 4] [ 1.41421354 2.82842708 4.2426405 5.65685415] [1, 1, 2, 2, 3, 3, 4, 4, 5, 5] [ 1.41421354 2.82842708 4.2426405 5.65685415 7.07106781] Regards, Egor On Wed, Dec 24, 2008 at 1:52 AM, Rich E reakina...@gmail.com wrote: Hi list, My question has to do

[Numpy-discussion] help with typemapping a C function to use numpy arrays

2008-12-23 Thread Rich E
Hi list, My question has to do with the Numpy/SWIG typemapping system. I recently got the typemaps in numpy.i to work on most of my C functions that are wrapped using SWIG, if they have arguments of the form (int sizeArray, float *pArray). Now I am trying to figure out how to wrap function that