Re: [Numpy-discussion] Viewer for 2D Numpy arrays (GUI)

2010-09-17 Thread Mayank P Jain
thanks everyone for wonderful suggestions. I am currently trying out spyder as it also gives me free interpreter and looks simple.. but all the suggestions are really nice and will definitely be of use later for me Regards Mayank P Jain V R TechNiche Transportation

Re: [Numpy-discussion] loadtxt stop

2010-09-17 Thread Benjamin Root
On Fri, Sep 17, 2010 at 3:04 PM, Zachary Pincus wrote: > On Sep 17, 2010, at 3:59 PM, Benjamin Root wrote: > > > So, this code will still raise an error for an empty file. > > Personally, I consider that a bug because I would expect to receive > > an empty array. I could understand raising an err

Re: [Numpy-discussion] loadtxt stop

2010-09-17 Thread Zachary Pincus
On Sep 17, 2010, at 3:59 PM, Benjamin Root wrote: > So, this code will still raise an error for an empty file. > Personally, I consider that a bug because I would expect to receive > an empty array. I could understand raising an error for a non-empty > file that does not contain anything u

Re: [Numpy-discussion] loadtxt stop

2010-09-17 Thread Benjamin Root
On Fri, Sep 17, 2010 at 2:50 PM, Zachary Pincus wrote: > > Though, really, it's annoying that numpy.loadtxt needs both the > > readline function *and* the iterator protocol. If it just used > > iterators, you could do: > > > > def truncator(fh, delimiter='END'): > > for line in fh: > > if li

Re: [Numpy-discussion] loadtxt stop

2010-09-17 Thread Zachary Pincus
> Though, really, it's annoying that numpy.loadtxt needs both the > readline function *and* the iterator protocol. If it just used > iterators, you could do: > > def truncator(fh, delimiter='END'): > for line in fh: > if line.strip() == delimiter: > break > yield line > > numpy.load

Re: [Numpy-discussion] loadtxt stop

2010-09-17 Thread Zachary Pincus
>> In the end, the question was; is worth adding start= and stop= >> markers >> into loadtxt to allow grabbing sections of a file between two known >> headers? I imagine it's something that people come up against >> regularly. Simple enough to wrap your file in a new file-like object that st

Re: [Numpy-discussion] restrictions on fancy indexing

2010-09-17 Thread Eric Firing
On 09/17/2010 08:04 AM, Anne Archibald wrote: > On 17 September 2010 13:47, Neal Becker wrote: >> It's nice I can do: >> >> f = np.linspace (0, 1, 100) >> u[f<.1] = 0 >> >> cool, this seems to work also: >> >> u[np.abs(f)<.1] = 0 >> >> cool! But exactly what kind of expressions are possible here?

Re: [Numpy-discussion] loadtxt stop

2010-09-17 Thread Christopher Barker
Neil Hodgson wrote: > In the end, the question was; is worth adding start= and stop= markers > into loadtxt to allow grabbing sections of a file between two known > headers? I imagine it's something that people come up against regularly. maybe not so regular. However, a common use would be to b

Re: [Numpy-discussion] restrictions on fancy indexing

2010-09-17 Thread Anne Archibald
On 17 September 2010 13:47, Neal Becker wrote: > It's nice I can do: > > f = np.linspace (0, 1, 100) > u[f<.1] = 0 > > cool, this seems to work also: > > u[np.abs(f)<.1] = 0 > > cool!  But exactly what kind of expressions are possible here?  Certainly > not arbitrary code. The short answer is, an

Re: [Numpy-discussion] Viewer for 2D Numpy arrays (GUI)

2010-09-17 Thread Benjamin Root
On Fri, Sep 17, 2010 at 10:53 AM, Gökhan Sever wrote: > On Fri, Sep 17, 2010 at 12:16 AM, Mayank P Jain wrote: > >> Currently I am exporting them to csv files, but I wonder if there is >> a viewer that can be used with native numpy array files to view and >> preferably modify the 2D arrays. >

Re: [Numpy-discussion] buffer arg to ndarray

2010-09-17 Thread Robert Kern
On Fri, Sep 17, 2010 at 12:42, Neal Becker wrote: > np.ndarray description says: >  buffer : object exposing buffer interface > > It's nice that it works with mmap: > > b = mmap.mmap (...) > u = np.ndarray (buffer=b ...) > > but you wouldn't know it from the above description. > > It doesn't look

Re: [Numpy-discussion] restrictions on fancy indexing

2010-09-17 Thread John Salvatier
There's a tutorial here: http://www.scipy.org/Cookbook/Indexing Look down for the section on Fancy Indexing. On Fri, Sep 17, 2010 at 10:47 AM, Neal Becker wrote: > It's nice I can do: > > f = np.linspace (0, 1, 100) > u[f<.1] = 0 > > cool, this seems to work also: > > u[np.abs(f)<.1] = 0 > > co

[Numpy-discussion] restrictions on fancy indexing

2010-09-17 Thread Neal Becker
It's nice I can do: f = np.linspace (0, 1, 100) u[f<.1] = 0 cool, this seems to work also: u[np.abs(f)<.1] = 0 cool! But exactly what kind of expressions are possible here? Certainly not arbitrary code. ___ NumPy-Discussion mailing list NumPy-Dis

[Numpy-discussion] buffer arg to ndarray

2010-09-17 Thread Neal Becker
np.ndarray description says: buffer : object exposing buffer interface It's nice that it works with mmap: b = mmap.mmap (...) u = np.ndarray (buffer=b ...) but you wouldn't know it from the above description. It doesn't look to me that the object returned by mmap exposes the buffer interface

Re: [Numpy-discussion] weighted mean; weighted standard error of the mean (sem)

2010-09-17 Thread josef . pktd
On Fri, Sep 10, 2010 at 3:01 PM, wrote: > On Fri, Sep 10, 2010 at 1:58 PM, Christopher Barrington-Leigh > wrote: >> Interesting. Thanks Erin, Josef and Keith. > > thanks to the stata page at least I figured out that WLS is aweights > with asumption mu_i = mu > > import numpy as np > from scikits

Re: [Numpy-discussion] Viewer for 2D Numpy arrays (GUI)

2010-09-17 Thread Gökhan Sever
On Fri, Sep 17, 2010 at 12:16 AM, Mayank P Jain wrote: > Currently I am exporting them to csv files, but I wonder if there is a > viewer that can be used with native numpy array files to view and preferably > modify the 2D arrays. > Any help would be appreciated. > I would suggest using IPy

Re: [Numpy-discussion] Numpy SVN frozen; move to Git

2010-09-17 Thread Stéfan van der Walt
On Fri, Sep 17, 2010 at 3:49 AM, Charles R Harris wrote: > IIRC, Stefan said that the newer version of the buildbot software works with > GIT. Looks like the only missing component is a Git Poller, and because this machine is behind such a scary firewall I'll have to ask the administrators to hel

Re: [Numpy-discussion] Viewer for 2D Numpy arrays (GUI)

2010-09-17 Thread Joe Harrington
There is a stand-alone program in wide use by astronomers that does 2D floating-point image display called ds9. It has a 2-way numpy interface and a rich set of image viewing/annotating features, including interactive colormapping, zoom/pan of very large images, n-up displays, movies, live row and

Re: [Numpy-discussion] loadtxt stop

2010-09-17 Thread Pierre GM
On Sep 17, 2010, at 2:40 PM, Neil Hodgson wrote: > oops, I meant to save my post but I sent it instead - doh! > > In the end, the question was; is worth adding start= and stop= markers into > loadtxt to allow grabbing sections of a file between two known headers? I > imagine it's something t

Re: [Numpy-discussion] loadtxt stop

2010-09-17 Thread Neil Hodgson
oops, I meant to save my post but I sent it instead - doh! In the end, the question was; is worth adding start= and stop= markers into loadtxt to allow grabbing sections of a file between two known headers? I imagine it's something that people come up against regularly. Thanks, Neil ___

[Numpy-discussion] loadtxt stop

2010-09-17 Thread Neil Hodgson
Hi, I been looking around and could spot anything on this. Quite often I want to read a homogeneous block of data from within a file. The skiprows option is great for missing out the section before the data starts, but if there is anything below then loadtxt will choke. I wondered if there w

Re: [Numpy-discussion] Silent DeprecationWarnings under Python 2.7 onwards

2010-09-17 Thread Peter
On Wed, Sep 15, 2010 at 3:34 PM, Benjamin Root wrote: > On Wed, Sep 15, 2010 at 8:28 AM, Ralf Gommers > wrote: >> >> >> On Fri, Sep 10, 2010 at 12:05 AM, Peter >>> http://docs.python.org/library/warnings.html#updating-code-for-new-versions-of-python >>> >>> This makes sense to me for deprecation

Re: [Numpy-discussion] Viewer for 2D Numpy arrays (GUI)

2010-09-17 Thread Kim Hansen
2010/9/17 Mayank P Jain > I thought about these options but what I need is excel like interface that > displays the values for each cell and one can modify and save the files. > > This would be convenient way of saving large files in less space and at the > same time, see them and would remove th

Re: [Numpy-discussion] Viewer for 2D Numpy arrays (GUI)

2010-09-17 Thread Nicolas Rougier
Maybe glumpy may be of some help: http://code.google.com/p/glumpy/ Nicolas On Fri, 2010-09-17 at 09:03 +0200, Massimo Di Stefano wrote: > Hi, > > > have yo already tryied Spyderlib : > > > http://code.google.com/p/spyderlib/ > > > a matlab-like environment based on pyqt > you can store

Re: [Numpy-discussion] Viewer for 2D Numpy arrays (GUI)

2010-09-17 Thread Massimo Di Stefano
Hi, have yo already tryied Spyderlib : http://code.google.com/p/spyderlib/ a matlab-like environment based on pyqt you can store object like array in a QtTable and modify/save it. Ciao, Massimo. Il giorno 17/set/2010, alle ore 08.53, Mayank P Jain ha scritto: > I thought about these options