Re: Questions on migrating from Numeric/Scipy to Numpy

2007-03-14 Thread Robert Kern
vj wrote: > What should I be using to replace Numeric/arrayobject.h: > > numpy/arrayobject.h > > or > > numpy/oldnumeric.h Replacing "numpy/oldnumeric.h" is the compatibility header. If you don't want to convert your code to use the new APIs (and you might; it is much improved), then that shoul

Re: Questions on migrating from Numeric/Scipy to Numpy

2007-03-14 Thread vj
What should I be using to replace Numeric/arrayobject.h: numpy/arrayobject.h or numpy/oldnumeric.h Thanks, VJ -- http://mail.python.org/mailman/listinfo/python-list

Re: Questions on migrating from Numeric/Scipy to Numpy

2007-03-13 Thread Robert Kern
vj wrote: >> Note that the mask needs to be a bool array. > mask = zeros(5) mask = zeros(5, numpy.int8) mask[1] = True mask[2] = True a = zeros(5) a[mask] = [100, 200] a > array([ 100., 100.,0.,0.,0.]) > > I found this strange. It should just give a

Re: Questions on migrating from Numeric/Scipy to Numpy

2007-03-13 Thread vj
> Note that the mask needs to be a bool array. >>> mask = zeros(5) >>> mask = zeros(5, numpy.int8) >>> mask[1] = True >>> mask[2] = True >>> a = zeros(5) >>> a[mask] = [100, 200] >>> a array([ 100., 100.,0.,0.,0.]) I found this strange. It should just give an error if you try to use

Re: Questions on migrating from Numeric/Scipy to Numpy

2007-03-13 Thread Robert Kern
vj wrote: >> It is just a redirection to the [EMAIL PROTECTED] list. If you just >> tried in the past hour or so, I've discovered that our DNS appears to be down >> right now. > > I tried registering the twice the last couple of days and never got an > email back. Hmm. Odd. I just tried to regist

Re: Questions on migrating from Numeric/Scipy to Numpy

2007-03-13 Thread vj
> It is just a redirection to the [EMAIL PROTECTED] list. If you just > tried in the past hour or so, I've discovered that our DNS appears to be down > right now. I tried registering the twice the last couple of days and never got an email back. > No, that's not what insert() does. See the docstr

Re: Questions on migrating from Numeric/Scipy to Numpy

2007-03-13 Thread Robert Kern
vj wrote: > I've tried to post this to the numpy google group but it seems to be > down. It is just a redirection to the numpy-discussion@scipy.org list. If you just tried in the past hour or so, I've discovered that our DNS appears to be down right now. > My migration seems to be going well. I c

Questions on migrating from Numeric/Scipy to Numpy

2007-03-13 Thread vj
I've tried to post this to the numpy google group but it seems to be down. My migration seems to be going well. I currently have one issue with using scipy_base.insert. >>> a = zeros(5) >>> mask = zeros(5) >>> mask[1] = 1 >>> c = zeros(1) >>> c[0] = 100 >>> numpy.insert(a, mask, c) array([ 100.,