Re: [Numpy-discussion] indexes in an array where value is greater than 1?

2012-05-27 Thread Benjamin Root
On Sunday, May 27, 2012, Chao YUE wrote: > for me, np.nonzero() and np.where() both work. It seems they have same > function. > > chao They are not identical. Nonzeros is for indices. The where function is really meant for a different purpose, but special-cases for this call signature. Ben Root

Re: [Numpy-discussion] pre-PEP for making creative forking of NumPy less destructive

2012-05-27 Thread Dag Sverre Seljebotn
On 05/18/2012 01:48 PM, mark florisson wrote: > On 17 May 2012 23:53, Dag Sverre Seljebotn wrote: >> I'm repeating myself a bit, but my previous thread of this ended up >> being about something else, and also since then I've been on an >> expedition to the hostile waters of python-dev. >> >> I'm c

Re: [Numpy-discussion] [ANN] Cell magics in IPython master

2012-05-27 Thread Fernando Perez
Hi Nathaniel, On Sun, May 27, 2012 at 4:11 AM, Nathaniel Smith wrote: > You guys are probably aware, but just in case, note that there's an > earlier (quite featureful) version of this idea included in the old > rnumpy code: >  https://bitbucket.org/njs/rnumpy/wiki/IPython_integration >  https:/

Re: [Numpy-discussion] why Segmentation fault (core dumped)?

2012-05-27 Thread Chao YUE
Just one more sentence. We are using version 0.9.7 on our server. when I tried to use: f=nc.Dataset('file.nc') to open the file (either big or small) within ipython, it works fine. Then when I tried to do %run cal_cmi_big.py, core dumped error. but %run cal_cmi_small.py works fine. The cal_cmi_big.

Re: [Numpy-discussion] why Segmentation fault (core dumped)?

2012-05-27 Thread Chao YUE
Dear Jeff, Thanks a lot for your reply. I think it might be related with the memory management on our sever. But anyway, as you suggested, I open an issue on netcdf4-python.google.co m. you can find the data and script on ftp://ftp.cea.fr/incoming/y2k01/chaoyue/.

Re: [Numpy-discussion] [ANN] Cell magics in IPython master

2012-05-27 Thread Nathaniel Smith
Hi Fernando, Excellent work! On Sun, May 27, 2012 at 8:08 AM, Fernando Perez wrote: > In a similar spirit, Jonathan Taylor recently created one to call R > transparently in the notebook: > > https://github.com/jonathan-taylor/Rmagic > > This one hasn't been fully updated to the final API, but th

Re: [Numpy-discussion] indexes in an array where value is greater than 1?

2012-05-27 Thread Chao YUE
for me, np.nonzero() and np.where() both work. It seems they have same function. chao 2012/5/27 Chris Withers > On 25/05/2012 16:21, Benjamin Root wrote: > > > > np.nonzero(arrrgh > 1) > > Did you mean np.where(arrrgh > 1)?for > I didn't know you could use np.nonzero in the way your describe? >

Re: [Numpy-discussion] indexes in an array where value is greater than 1?

2012-05-27 Thread Chris Withers
On 25/05/2012 16:21, Benjamin Root wrote: > > np.nonzero(arrrgh > 1) Did you mean np.where(arrrgh > 1)? I didn't know you could use np.nonzero in the way your describe? Chris -- Simplistix - Content Management, Batch Processing & Python Consulting - http://www.simplistix.co.uk _

[Numpy-discussion] [ANN] Cell magics in IPython master

2012-05-27 Thread Fernando Perez
Hi folks, [ Sorry for the slightly off-topic post, but I know that a number of people on this list have long wanted more seamless ways to integrate with tools like Cython and R, and you may not necessarily follow the ipython lists...] I'm excited to report that we now have cell magics in IPython.