Re: [Numpy-discussion] Applying argwhere to an array

2009-11-19 Thread Robert Kern
On Fri, Nov 20, 2009 at 01:21, - wrote: > So if I have a 2-dimensional array, and I want to return the indexes > of all the elements that are larger than some value, then I just use > np.argwhere(d > 1) or something, where d is the array.  However, is > there anything I can do that's similar, but

[Numpy-discussion] Applying argwhere to an array

2009-11-19 Thread -
So if I have a 2-dimensional array, and I want to return the indexes of all the elements that are larger than some value, then I just use np.argwhere(d > 1) or something, where d is the array. However, is there anything I can do that's similar, but return the indexes of the elements that are large

Re: [Numpy-discussion] datetime64

2009-11-19 Thread Travis Oliphant
we're starting to use these tools more and more, and with the 1.4 release coming out, we're a bit lost here... A few specific questions we have: The short answer to all of the questions is that datetime is not done yet. Robert and I worked on the underlying framework so that it could be

Re: [Numpy-discussion] Fitting a curve on a log-normal distributed data

2009-11-19 Thread Ian Mallett
Hello, My analysis shows that the exponential regression gives the best result (r^2=87%)--power regression gives worse results (r^2=77%). Untransformed data gives r^2=76%. I don't think you want lognorm. If I'm not mistaken, that fits the data to a log(normal distribution random variable). So,

Re: [Numpy-discussion] datetime64

2009-11-19 Thread Charles R Harris
On Thu, Nov 19, 2009 at 6:47 PM, David Cournapeau wrote: > On Fri, Nov 20, 2009 at 8:25 AM, Pierre GM wrote: > > > > On Nov 19, 2009, at 5:40 PM, Fernando Perez wrote: > >> > >> we're starting to use these tools more and more, and with the 1.4 > >> release coming out, we're a bit lost here... > >

Re: [Numpy-discussion] datetime64

2009-11-19 Thread Travis Oliphant
-- (mobile phone of) Travis Oliphant Enthought, Inc. 1-512-536-1057 http://www.enthought.com On Nov 19, 2009, at 7:47 PM, David Cournapeau wrote: > On Fri, Nov 20, 2009 at 8:25 AM, Pierre GM > wrote: >> >> On Nov 19, 2009, at 5:40 PM, Fernando Perez wrote: >>> >>> we're starting to use th

[Numpy-discussion] Failure building pdf doc

2009-11-19 Thread David Cournapeau
Hi, While checking everything builds for the 1.4.0 release, I noticed a problem with building the latex version: writing... done processing numpy-user.tex... user/index user/introduction user/whatisnumpy user/install user/howtofind user/basics user/basics.types user/basics.creation user/basics.io

Re: [Numpy-discussion] datetime64

2009-11-19 Thread David Cournapeau
On Fri, Nov 20, 2009 at 8:25 AM, Pierre GM wrote: > > On Nov 19, 2009, at 5:40 PM, Fernando Perez wrote: >> >> we're starting to use these tools more and more, and with the 1.4 >> release coming out, we're a bit lost here... > > Welcome to the club... > Fernando, Ariel, I'm in the same spot as you

Re: [Numpy-discussion] Numpy/Scipy for EC2

2009-11-19 Thread Dan Yamins
Hi all: I'm just writing to report on my experience using Starcluster, which enables the use of NumPy and Scipy in the Amazon EC2 cloud computing environment. The purpose of my email is to extol Starcluster's qualities, and suggest that the NumPy community be aware of its development.I suspect

Re: [Numpy-discussion] Beginner Needing Help with Installation

2009-11-19 Thread Pierre GM
On Nov 19, 2009, at 7:00 PM, Scot Denhalter wrote: > > I am not building anything at the moment. I am simply trying to learn > Python as it pertains to Natural Language Processing. And soon you'll get addicted and start installing stuffs ;) > Yes, my MacBook Pro came with Python 2.5. Pierre

Re: [Numpy-discussion] Beginner Needing Help with Installation

2009-11-19 Thread David Warde-Farley
On 19-Nov-09, at 7:00 PM, Scot Denhalter wrote: > Yes, my MacBook Pro came with Python 2.5. Pierre recommends iPython, > but the book I am using to learn Python (Natural Language Processing > with Python) says that the NLTK won't work with anything above version > 2.6. I discovered that limitat

Re: [Numpy-discussion] Beginner Needing Help with Installation

2009-11-19 Thread Scot Denhalter
On Thu, Nov 19, 2009 at 4:32 PM, David Warde-Farley wrote: > On 19-Nov-09, at 5:41 PM, Scot Denhalter wrote: > >> Yes, I am using the Snow Leopard OSX.  Should I be coding through >> the Xcode >> interface and not Python's IDLE shell? > > Using the Xcode IDE is not necessary and probably far from

Re: [Numpy-discussion] Beginner Needing Help with Installation

2009-11-19 Thread David Warde-Farley
On 19-Nov-09, at 5:41 PM, Scot Denhalter wrote: > Yes, I am using the Snow Leopard OSX. Should I be coding through > the Xcode > interface and not Python's IDLE shell? Using the Xcode IDE is not necessary and probably far from optimal for what you're doing; however Xcode installs all of the

Re: [Numpy-discussion] Beginner Needing Help with Installation

2009-11-19 Thread Pierre GM
On Nov 19, 2009, at 5:41 PM, Scot Denhalter wrote: > Pierre, > > Yes, I am using the Snow Leopard OSX. Should I be coding through the Xcode > interface and not Python's IDLE shell? Oh no, that's not what I meant when I asked you if you had installed Xcode. It's just that you need Xcode for

Re: [Numpy-discussion] datetime64

2009-11-19 Thread Pierre GM
On Nov 19, 2009, at 5:40 PM, Fernando Perez wrote: > > we're starting to use these tools more and more, and with the 1.4 > release coming out, we're a bit lost here... Welcome to the club... Fernando, Ariel, I'm in the same spot as you are, I haven't been able to use it. I don't think it's tha

Re: [Numpy-discussion] Beginner Needing Help with Installation

2009-11-19 Thread David Warde-Farley
On 19-Nov-09, at 5:36 PM, Scot Denhalter wrote: > On Thu, Nov 19, 2009 at 2:46 PM, Eric Firing > wrote: >> >> You don't need a fortran compiler for numpy, even if you are building >> from source; and you probably don't need to build from source. Did >> you >> try the suggested binary package

Re: [Numpy-discussion] Beginner Needing Help with Installation

2009-11-19 Thread Scot Denhalter
Pierre, Yes, I am using the Snow Leopard OSX. Should I be coding through the Xcode interface and not Python's IDLE shell? You distinguish between system wide installation and user installation. You may have seen from my post to Eric, that I found and installed .dmg downloads for numpy and matpl

Re: [Numpy-discussion] datetime64

2009-11-19 Thread Fernando Perez
Hi all, On Thu, Oct 29, 2009 at 12:43 PM, Pierre GM wrote: > Oh yes, I saw that... Marty Fuhry, one of our GSoC students, had > written some pretty extensive series of tests to allocate datetime/ > strings to elements of a ndarray with datetime64 dtype. He also had > written some functions allowi

Re: [Numpy-discussion] Beginner Needing Help with Installation

2009-11-19 Thread Scot Denhalter
Eric, Yes, I downloaded the files recommended on that webpage. The tar.gz files unpack, but they do not install, and I am too much of a newbie to figure out how to install the files in the unpacked folder. No matter where I placed the numpy folder, I couldn't get Python 2.6 to find and install n

Re: [Numpy-discussion] Beginner Needing Help with Installation

2009-11-19 Thread Pierre GM
On Nov 19, 2009, at 4:34 PM, Scot Denhalter wrote: > I am a beginning programmer who is reading Natural Language Processing with > Python. The book provides tutorials for working with the NLTK, which needs > numpy to run certain calculations. I have downloaded and installed Python > 2.6. I h

Re: [Numpy-discussion] Beginner Needing Help with Installation

2009-11-19 Thread Eric Firing
Scot Denhalter wrote: > I am a beginning programmer who is reading Natural Language Processing > with Python. The book provides tutorials for working with the NLTK, > which needs numpy to run certain calculations. I have downloaded and > installed Python 2.6. I have downloaded numpy 1.3.0, but

[Numpy-discussion] Beginner Needing Help with Installation

2009-11-19 Thread Scot Denhalter
I am a beginning programmer who is reading Natural Language Processing with Python. The book provides tutorials for working with the NLTK, which needs numpy to run certain calculations. I have downloaded and installed Python 2.6. I have downloaded numpy 1.3.0, but I cannot figure out how to insta

[Numpy-discussion] OverflowError using _nanop with unsigned integers

2009-11-19 Thread Tony S Yu
Hi, Functions that call _nanop (i.e. nan[arg]min, nan[arg]max) currently fail with unsigned integers. For example: >>> np.nanmin(np.array([0, 1], dtype=np.uint8)) OverflowError: cannot convert float infinity to integer It seems that unsigned integers don't get identified as integers in the _na

Re: [Numpy-discussion] [matplotlib-devel] matplotlib is breaking numpy

2009-11-19 Thread Michael Droettboom
Yes, for efficiency reasons matplotlib will use a reference to original data whenever possible, rather than copying it. Also, when using the pylab/pyplot API, matplotlib figures also stay around until they are explicitly deleted. You may need an explicit call to "clf('all')" to remove the fig

Re: [Numpy-discussion] matplotlib is breaking numpy

2009-11-19 Thread Mathew Yeates
yes, a GTK app from the python shell. And not using the toolbar. I'll see if I can extract out a sample of code that demonstrates the problem I'm having. Thx Mathew On Thu, Nov 19, 2009 at 10:56 AM, John Hunter wrote: > > > > > On Nov 19, 2009, at 12:53 PM, Mathew Yeates wrote: > > I am runnin

Re: [Numpy-discussion] matplotlib is breaking numpy

2009-11-19 Thread John Hunter
On Nov 19, 2009, at 12:53 PM, Mathew Yeates wrote: I am running my gtk app from python. I am deleting the canvas and running gc.collect(). I still seem to have a reference to my memmapped data. Any other hints? Gtk app from the standard python shell? Are you using the mpl toolbar

Re: [Numpy-discussion] matplotlib is breaking numpy

2009-11-19 Thread Mathew Yeates
I am running my gtk app from python. I am deleting the canvas and running gc.collect(). I still seem to have a reference to my memmapped data. Any other hints? -Mathew On Thu, Nov 19, 2009 at 10:42 AM, John Hunter wrote: > > > > > On Nov 19, 2009, at 12:35 PM, Mathew Yeates wrote: > > Yeah, I

Re: [Numpy-discussion] matplotlib is breaking numpy

2009-11-19 Thread John Hunter
On Nov 19, 2009, at 12:35 PM, Mathew Yeates wrote: Yeah, I tried that. Here's what I'm doing. I have an application which displays different dataset which a user selects from a drop down list. I want to overwrite the existing plot with a new one. I've tried deleting just about eve

Re: [Numpy-discussion] matplotlib is breaking numpy

2009-11-19 Thread Mathew Yeates
Yeah, I tried that. Here's what I'm doing. I have an application which displays different dataset which a user selects from a drop down list. I want to overwrite the existing plot with a new one. I've tried deleting just about everything get matplotlib to let go of my data! Mathew On Thu, Nov 19

Re: [Numpy-discussion] matplotlib is breaking numpy

2009-11-19 Thread John Hunter
On Nov 19, 2009, at 11:57 AM, Robert Kern wrote: > On Thu, Nov 19, 2009 at 11:52, Mathew Yeates > wrote: >> There is definitely something wrong with matplotlib/numpy. Consider >> the >> following >>> from numpy import * >>> mydata=memmap('map.dat',dtype=float64,mode='w+',shape=56566500)

Re: [Numpy-discussion] matplotlib is breaking numpy

2009-11-19 Thread Robert Kern
On Thu, Nov 19, 2009 at 11:52, Mathew Yeates wrote: > There is definitely something wrong with matplotlib/numpy. Consider the > following >>from numpy import * >>mydata=memmap('map.dat',dtype=float64,mode='w+',shape=56566500) >> del mydata > > I can now remove the file map.dat with (from the comma

[Numpy-discussion] matplotlib is breaking numpy

2009-11-19 Thread Mathew Yeates
There is definitely something wrong with matplotlib/numpy. Consider the following >from numpy import * >mydata=memmap('map.dat',dtype=float64,mode='w+',shape=56566500) > del mydata I can now remove the file map.dat with (from the command line) $rm map.dat However If I plot mydata before the line

Re: [Numpy-discussion] Solaris Sparc build broken

2009-11-19 Thread Robert Kern
On Thu, Nov 19, 2009 at 01:43, David Cournapeau wrote: > Robert Kern wrote: > >>  One can have a proprietary application statically linked >> with an LGPL library. The only detail there is that, in order to >> satisfy the "user must be able to relink the application with a >> modified Library" req

Re: [Numpy-discussion] Solaris Sparc build broken

2009-11-19 Thread David Cournapeau
Robert Kern wrote: > One can have a proprietary application statically linked > with an LGPL library. The only detail there is that, in order to > satisfy the "user must be able to relink the application with a > modified Library" requirement, the distributor must provide object > files for his p