Re: [Numpy-discussion] formatting issues, locale and co

2009-01-12 Thread Pauli Virtanen
Wed, 31 Dec 2008 13:11:02 +0900, David Cournapeau wrote: [clip] > Thank you for working on this, Pauli. The problem on windows may not be > specific to windows: the difference really is whether the formatting is > done by python or the C runtime. It just happens that on Linux and Mac > OS X, the st

Re: [Numpy-discussion] Is there anyway to seed random numbers without global state?

2009-01-12 Thread Gael Varoquaux
On Mon, Jan 12, 2009 at 01:41:24PM -0600, Tom Denniston wrote: > I would think the ideal would be to be able to build random number > objects where each has a seed so that each object's seed is > independent. You mean something like: In [1]: import numpy as np In [2]: rs = np.random.RandomState(

Re: [Numpy-discussion] Is there anyway to seed random numbers without global state?

2009-01-12 Thread Robert Kern
On Mon, Jan 12, 2009 at 13:41, Tom Denniston wrote: > I know how to seed and generate random numbers using: > numpy.random.seed and numpy.random.rand > > The problem is the seeding of the random numbers is global which I > would think would make it non-thread safe as well as having all the > other

[Numpy-discussion] Is there anyway to seed random numbers without global state?

2009-01-12 Thread Tom Denniston
I know how to seed and generate random numbers using: numpy.random.seed and numpy.random.rand The problem is the seeding of the random numbers is global which I would think would make it non-thread safe as well as having all the other annoyances of global state like having so set the seed and set

Re: [Numpy-discussion] coding style: citations

2009-01-12 Thread jh
Well, best to have the full functionality. These things are intended to be both book components and stand-alone pages. Citation formats are a religious war anyway. --jh-- Date: Mon, 12 Jan 2009 12:41:17 -0500 From: Alan G Isaac Subject: Re: [Numpy-discussion] coding style: citations To: Discus

Re: [Numpy-discussion] coding style: citations

2009-01-12 Thread Alan G Isaac
On 1/12/2009 9:08 AM j...@physics.ucf.edu apparently wrote: > For citation keys, what's wrong with good old author-year format? > Most scientific journals use it (Abt 1985). > Abt, H. 1985. Harold Abt used to publish surveys of things like > citations when he was ApJ editor in the 1980s but I

Re: [Numpy-discussion] Fast function application on list of 2D points?

2009-01-12 Thread Paulo J. S. Silva
Eric, You question raised my attention due to a recent post of mine related to the same kind of problem. I was solving it without using apply_along_axis (due to ignorance). However I tried to use apply_along_axis to solve my problem and it proved to be very slow. Try the following: ---

Re: [Numpy-discussion] Fast function application on list of 2D points?

2009-01-12 Thread Paulo J. S. Silva
Why you don't create a mask to select only the points in array that satisfies the condition on x and y coordinates. For example the code below applies filter only to the values that have x coordinate bigger than 0.7 and y coordinate smaller than 0.3: mask = numpy.logical_and(points[:,0] > 0.7,

[Numpy-discussion] Fast function application on list of 2D points?

2009-01-12 Thread Eric LEBIGOT
Hello, What is the fastest way of applying a function on a list of 2D points? More specifically, I have a list of 2D points, and some do not meet some criteria and must be rejected. Even more specifically, the filter only lets through points whose x coordinate satisfies some condition, _and_

Re: [Numpy-discussion] coding style: citations

2009-01-12 Thread jh
> ... citations ... BibTeX Please ensure that, whatever you come up with, it is *very intuitive* for the writer to enter the citation data, or we will quickly lose citations, and possibly writers. For example, I would not have them type in BibTeX entries, but rather provide boxes where they can e

Re: [Numpy-discussion] memmap from fd?

2009-01-12 Thread Neal Becker
Robert Kern wrote: ... >> >> Hmm. frombuffer sounds nice, but python mmap doesn't expose buffer >> interface (I just added a feature request for this). I suppose I could >> write my own mmap module. > > Yeah, it does. Why do you think it doesn't? If it didn't work, the > memmap class wouldn't w