Re: [Numpy-discussion] Is this a bug, and if so, who's?

2010-04-25 Thread Travis Oliphant
On Apr 21, 2010, at 10:47 AM, Ken Basye wrote: Folks, Apologies for asking here, but I ran across this problem yesterday and probably need to file a bug. The problem is I don't know if this is a Numpy bug, a Python bug, or both. Here's an illustration, platform information follows.

[Numpy-discussion] [ANN] NumPy 1.4.1

2010-04-25 Thread Ralf Gommers
Hi, I am pleased to announce the release of NumPy 1.4.1. This maintenance release removes datetime support, which fixes the binary incompatibility issues between NumPy 1.4.0 and SciPy and other extension packages. Several other bug fixes are also included. Binaries, sources and release notes can

Re: [Numpy-discussion] Aggregate memmap

2010-04-25 Thread Robert Kern
On Wed, Apr 21, 2010 at 14:41, Matthew Turk matthewt...@gmail.com wrote: Hi there, I've quite a bit of unformatted fortran data that I'd like to use as input to a memmap, as sort of a staging area for selection of subregions to be loaded into RAM.  Unfortunately, what I'm running into is

Re: [Numpy-discussion] trim_zeros in more than one dimension?

2010-04-25 Thread Bruce Southey
On 04/21/2010 02:45 PM, Robert Kern wrote: On Wed, Apr 21, 2010 at 10:34, Bruce Southeybsout...@gmail.com wrote: On 04/21/2010 08:36 AM, Robert Kern wrote: On Tue, Apr 20, 2010 at 18:45, Charles R Harris charlesr.har...@gmail.comwrote: On Tue, Apr 20, 2010 at 7:03

Re: [Numpy-discussion] Aggregate memmap

2010-04-25 Thread Anne Archibald
On 21 April 2010 15:41, Matthew Turk matthewt...@gmail.com wrote: Hi there, I've quite a bit of unformatted fortran data that I'd like to use as input to a memmap, as sort of a staging area for selection of subregions to be loaded into RAM. Unfortunately, what I'm running into is that the

Re: [Numpy-discussion] Aggregate memmap

2010-04-25 Thread David Huard
Hi Matt, I don't think the memmap code support this. However, you can stack memmaps just as easily as arrays, so if you define individual memmaps for each slice and stack them (numpy.vstack), the resulting array will behave as a regular 3D array. HTH, David H. On Wed, Apr 21, 2010 at 3:41

[Numpy-discussion] Speeding up loadtxt / savetxt

2010-04-25 Thread Andreas
Hi there, I was wondering if there's a way to speedup loadtxt/savetxt for big arrays? So far, I'm plainly using something like this:: file = open(array.txt,w) a = np.loadtxt(file) file.close() However, since my files are pretty big (~200M), that's taking a long time... Perhaps

[Numpy-discussion] wrapping arrays with savetxt

2010-04-25 Thread Andreas
Hi there, I would like to use savetxt() to write a 2d array to a txt file. It should be written row-wise, but there should only be 10 values per line. So, if I want to write an array a((2,12)), the file should read like this: X X X X X X X X X X X X X X X X X X X X X X X X Is there any way

Re: [Numpy-discussion] My GSoC Proposal to Implement a Subset of NumPy for PyPy

2010-04-25 Thread René Dudfield
On Wed, Apr 21, 2010 at 1:21 PM, Dag Sverre Seljebotn da...@student.matnat.uio.no wrote: Dan Roberts wrote: Thanks for the reply. You're certainly right that your work is extremely beneficial to mine. At present I'm afraid a great deal of NumPy C code isn't easily reusable and it's

[Numpy-discussion] toydist: Using manually after build system now?

2010-04-25 Thread Dag Sverre Seljebotn
(The toydist manual says to use this list, so here I go...) Is it possible to invoke toydist manually to install something built manually with a build system? How is the final .info specification supposed to look like when toysetup is coupled with a build system? I tried this: Library:

Re: [Numpy-discussion] Disabling Extended Precision in NumPy (like -ffloat-store)

2010-04-25 Thread Charles R Harris
On Wed, Apr 21, 2010 at 9:04 PM, Adrien Guillon aj.guil...@gmail.comwrote: Thank you for your questions... I'll answer them now. The motivation behind using Python and NumPy is to be able to double check that the numerical algorithms work okay in an engineer/scientist friendly language.

[Numpy-discussion] ma.std(ddof=1) bug?

2010-04-25 Thread josef . pktd
Is there a reason why ma.std(ddof=1) does not calculated the std if there are 2 valid values? example nan = np.nan x1 = np.array([[9.0, 3.0, nan, nan, 9.0, nan], [1.0, 1.0, 1.0, nan, nan, nan], [2.0, 2.0, 0.01, nan, 1.0, nan], [3.0, 9.0, 2.0, nan, nan,

Re: [Numpy-discussion] Disabling Extended Precision in NumPy (like -ffloat-store)

2010-04-25 Thread Jason Grout
On 04/21/2010 09:47 AM, Adrien Guillon wrote: Hello all, I've recently started to use NumPy to prototype some numerical algorithms, which will eventually find their way to a GPU (where I want to limit myself to single-precision operations for performance reasons). I have recently switched

Re: [Numpy-discussion] My GSoC Proposal to Implement a Subset of NumPy for PyPy

2010-04-25 Thread Dan Roberts
Wow, that's a very cool idea. I think that's an excellent approach to allowing user RPython functions. Maciej expressed concern this could create a support burden for RPython for the core PyPy developers (There aren't many of them). I think, handled correctly, this could help create a community

Re: [Numpy-discussion] Disabling Extended Precision in NumPy (like -ffloat-store)

2010-04-25 Thread David Warde-Farley
Adrien Guillon wrote: Thank you for your questions... I'll answer them now. The motivation behind using Python and NumPy is to be able to double check that the numerical algorithms work okay in an engineer/scientist friendly language. We're basically prototyping a bunch of algorithms in

[Numpy-discussion] Patches for review cleanup.

2010-04-25 Thread Charles R Harris
Hi folks, There are a lot of patches sitting around waiting for review. I think most can be taken care of pretty quickly and closed. There are, however, a half dozen or so small patches relating to distutils that someone familiar with that part of numpy should go over (David?). Anyway, lets get

Re: [Numpy-discussion] toydist: Using manually after build system now?

2010-04-25 Thread David Cournapeau
On Fri, Apr 23, 2010 at 10:29 PM, Dag Sverre Seljebotn da...@student.matnat.uio.no wrote: (The toydist manual says to use this list, so here I go...) Is it possible to invoke toydist manually to install something built manually with a build system? This is not yet supported, but is basically

Re: [Numpy-discussion] Disabling Extended Precision in NumPy (like -ffloat-store)

2010-04-25 Thread David Cournapeau
On Thu, Apr 22, 2010 at 12:04 PM, Adrien Guillon aj.guil...@gmail.com wrote: The idea here, is that if I can ensure there is never extended precision in the Python code... This is totally out of reach with numpy is you use the float32 dtype, for the reasons I have given before. The only

[Numpy-discussion] floats as axis

2010-04-25 Thread josef . pktd
(some) numpy functions take floats as valid axis argument. Is this a feature? np.ones((2,3)).sum(1.2) array([ 3., 3.]) np.ones((2,3)).sum(1.99) array([ 3., 3.]) np.mean((1.5,0.5)) 1.0 np.mean(1.5,0.5) 1.5 Keith pointed out that scipy.stats.nanmean has a different behavior

Re: [Numpy-discussion] floats as axis

2010-04-25 Thread Keith Goodman
On Sun, Apr 25, 2010 at 6:16 AM, josef.p...@gmail.com wrote: (some) numpy functions take floats as valid axis argument. Is this a feature? np.ones((2,3)).sum(1.2) array([ 3.,  3.]) np.ones((2,3)).sum(1.99) array([ 3.,  3.]) np.mean((1.5,0.5)) 1.0 np.mean(1.5,0.5) 1.5 Keith pointed

Re: [Numpy-discussion] floats as axis

2010-04-25 Thread josef . pktd
On Sun, Apr 25, 2010 at 10:45 AM, Keith Goodman kwgood...@gmail.com wrote: On Sun, Apr 25, 2010 at 6:16 AM,  josef.p...@gmail.com wrote: (some) numpy functions take floats as valid axis argument. Is this a feature? np.ones((2,3)).sum(1.2) array([ 3.,  3.]) np.ones((2,3)).sum(1.99) array([

Re: [Numpy-discussion] Aggregate memmap

2010-04-25 Thread Robert Kern
On Thu, Apr 22, 2010 at 21:57, David Huard david.hu...@gmail.com wrote: Hi Matt, I don't think the memmap code support this. However, you can stack memmaps just as easily as arrays, so if you define individual memmaps for each slice and stack them (numpy.vstack), the resulting array will

[Numpy-discussion] Incomplete uninstall of 1.4.0 superpack

2010-04-25 Thread threexk threexk
Hello, I recently uninstalled the NumPy 1.4.0 superpack for Python 2.6 on Windows 7, and afterward a dialog popped up that said 1 file or directory could not be removed. Does anyone have any idea which file/directory this is? The dialog gave no indication. Is an uninstall log with details

Re: [Numpy-discussion] trim_zeros in more than one dimension?

2010-04-25 Thread Robert Kern
On Thu, Apr 22, 2010 at 16:23, Bruce Southey bsout...@gmail.com wrote: On 04/21/2010 02:45 PM, Robert Kern wrote: On Wed, Apr 21, 2010 at 10:34, Bruce Southeybsout...@gmail.com  wrote: If the sum of axis to be removed equals zero then you can conditionally remove that axis. No. Negative

Re: [Numpy-discussion] trim_zeros in more than one dimension?

2010-04-25 Thread Robert Kern
On Sun, Apr 25, 2010 at 16:17, Robert Kern robert.k...@gmail.com wrote: On Thu, Apr 22, 2010 at 16:23, Bruce Southey bsout...@gmail.com wrote: On 04/21/2010 02:45 PM, Robert Kern wrote: On Wed, Apr 21, 2010 at 10:34, Bruce Southeybsout...@gmail.com  wrote: If the sum of axis to be removed

Re: [Numpy-discussion] Incomplete uninstall of 1.4.0 superpack

2010-04-25 Thread David Cournapeau
On Mon, Apr 26, 2010 at 2:42 AM, threexk threexk thre...@hotmail.com wrote: Hello, I recently uninstalled the NumPy 1.4.0 superpack for Python 2.6 on Windows 7, and afterward a dialog popped up that said 1 file or directory could not be removed.  Does anyone have any idea which file/directory