Re: [Numpy-discussion] Deprecating PyDataMem_RENEW ?

2008-05-06 Thread David Cournapeau
Robert Kern wrote: > > Since there are only 6 places where PyMemData_RENEW is used, all 6 > uses should be benchmarked. I would prefer a more targeted benchmark > so we know exactly what we are measuring. > Ok, I started a new branch for aligned allocator: http://projects.scipy.org/scipy/numpy/br

[Numpy-discussion] Status Report for NumPy 1.1.0

2008-05-06 Thread Jarrod Millman
Hey, The trunk is in pretty good shape and it is about time that I put out an official release. So tomorrow (in a little over twelve hours) I am going to create a 1.1.x branch and the trunk will be officially open for 1.2 development. If there are no major issues that show up at the last minute,

Re: [Numpy-discussion] Deprecating PyDataMem_RENEW ?

2008-05-06 Thread Anne Archibald
2008/5/5 David Cournapeau <[EMAIL PROTECTED]>: > Basically, what I have in mind is, in a first step (for numpy 1.2): > - define functions to allocate on a given alignement > - make PyMemData_NEW 16 byte aligned by default (to be compatible > with SSE and co). > > The problem was, and st

Re: [Numpy-discussion] numpy in RHEL4

2008-05-06 Thread Bala subramanian
Dear Robert, Thank you. But i am trying to install it in a 32-bit machine only. In that case, why dose it require 64 bit libraries. Bala On Mon, May 5, 2008 at 10:47 PM, Robert Kern <[EMAIL PROTECTED]> wrote: > On Mon, May 5, 2008 at 6:14 AM, Bala subramanian > <[EMAIL PROTECTED]> wrote: > > Dea

[Numpy-discussion] cannot edit page on scipy-dev wiki

2008-05-06 Thread Vincent Noel
Hello all, I wanted to fix the formatting problems on the wiki page http://scipy.org/scipy/numpy/wiki/MaskedArrayApiChanges, so I followed the instructions on http://scipy.org/scipy/numpy/wiki (which state "In order to edit wiki pages or create and edit tickets, you need to register first.") But e

Re: [Numpy-discussion] Learn about numpy

2008-05-06 Thread Folkert Boonstra
Nadav Horesh schreef: > I think you have a problem of overflow in r5: You may better use utin64 > instead of uint32. > > Nadav. > > Nadav, My problems were due to trying to do two things at once. The code below does what I want and it is very fast. I see the power of numpy now: import numpy

Re: [Numpy-discussion] Deprecating PyDataMem_RENEW ?

2008-05-06 Thread David Cournapeau
Anne Archibald wrote: > > How much does this matter? I mean, what if you simply left all the > reallocs as-is? The arrays that resulted from reallocs would not > typically be aligned, but we cannot in any case expect all arrays to > be aligned. The problem would be the interaction between the alig

[Numpy-discussion] "Segmentation fault (core dumped)" as result of matrix multiplication

2008-05-06 Thread Marius Nijhuis
Hello, I encountered the error "Segmentation fault (core dumped)" during a rather standard multiplication, without excessive memory us. This looks likes a bug to me? I am using Python 2.5, Numpy 1.0.4 under Ubuntu 7.10. Here is what I am doing: i have two arrays, points1 and points2. points1.sh

Re: [Numpy-discussion] "Segmentation fault (core dumped)" as result of matrix multiplication

2008-05-06 Thread Pauli Virtanen
ti, 2008-05-06 kello 14:15 +0200, Marius Nijhuis kirjoitti: > Hello, > > I encountered the error "Segmentation fault (core dumped)" during a > rather standard multiplication, without excessive memory us. This > looks likes a bug to me? > I am using Python 2.5, Numpy 1.0.4 under Ubuntu 7.10. >

Re: [Numpy-discussion] Status Report for NumPy 1.1.0

2008-05-06 Thread Alan G Isaac
On Tue, 6 May 2008, Jarrod Millman apparently wrote: > open tickets that I would like everyone to take a brief > look at: > http://projects.scipy.org/scipy/numpy/ticket/760 My understanding is that my patch, which would give a deprecation warning, was rejected in favor of the patch specified at

[Numpy-discussion] Tests for empty arrays

2008-05-06 Thread Andy Cheesman
Hi nice numpy people I was wondering if anyone could shed some light on how to distinguish an empty array of a given shape and an zeros array of the same dimensions. Thanks Andy ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://proje

Re: [Numpy-discussion] Tests for empty arrays

2008-05-06 Thread Timothy Hochberg
On Tue, May 6, 2008 at 9:31 AM, Andy Cheesman <[EMAIL PROTECTED]> wrote: > Hi nice numpy people > > I was wondering if anyone could shed some light on how to distinguish an > empty array of a given shape and an zeros array of the same dimensions. An empty array is just uninitialized, while a zer

[Numpy-discussion] labeled array

2008-05-06 Thread Keith Goodman
I'm trying to design a labeled array class. A labeled array contains a 2d array and two lists. One list labels the rows of the array (e.g. variable names) and another list labels the columns of the array (e.g. dates). You can sum (or multiply, divide, subtract, etc.) two labeled arrays that have d

Re: [Numpy-discussion] Tests for empty arrays

2008-05-06 Thread Anne Archibald
2008/5/6 Andy Cheesman <[EMAIL PROTECTED]>: > I was wondering if anyone could shed some light on how to distinguish an > empty array of a given shape and an zeros array of the same dimensions. An "empty" array, that is, an array returned by the function empty(), just means an uninitialized arra

Re: [Numpy-discussion] Tests for empty arrays

2008-05-06 Thread Keith Goodman
On Tue, May 6, 2008 at 9:45 AM, Anne Archibald <[EMAIL PROTECTED]> wrote: > In fact, if you want to use empty() down the road, it may > make sense to initialize your array to zeros()/0., so that if you ever > use the values, the NaNs will propagate and become obvious. Numpy has ones and zeros.

Re: [Numpy-discussion] Tests for empty arrays

2008-05-06 Thread Timothy Hochberg
On Tue, May 6, 2008 at 9:53 AM, Keith Goodman <[EMAIL PROTECTED]> wrote: > On Tue, May 6, 2008 at 9:45 AM, Anne Archibald > <[EMAIL PROTECTED]> wrote: > > In fact, if you want to use empty() down the road, it may > > make sense to initialize your array to zeros()/0., so that if you ever > > use

Re: [Numpy-discussion] Tests for empty arrays

2008-05-06 Thread Keith Goodman
On Tue, May 6, 2008 at 10:03 AM, Timothy Hochberg <[EMAIL PROTECTED]> wrote: > Why don't you just roll your own? > > >>> def nans(shape, dtype=float): > ... a = np.empty(shape, dtype) > ... a.fill(np.nan) > ... return a > ... > >>> nans([3,4]) > array([[ NaN, NaN, NaN, NaN], >

Re: [Numpy-discussion] labeled array

2008-05-06 Thread Christoph T. Weidemann
On Tue, May 6, 2008 at 1:00 PM, "Keith Goodman" <[EMAIL PROTECTED]> wrote: > I'm trying to design a labeled array class. A labeled array contains a > 2d array and two lists. One list labels the rows of the array (e.g. > variable names) and another list labels the columns of the array (e.g. >

[Numpy-discussion] __float__ is not called when instance can not evaluated.

2008-05-06 Thread Sebastian Krämer
Hi all, I'm currently working on a function that converts a sympy (http://code.google.com/p/sympy) expression to a lambda-function. In this lambda-function all sympy builtin functions are replaced by numpy functions, since they are faster. Now it may happen that users pass sympy-symbols like pi t

[Numpy-discussion] What is .T?

2008-05-06 Thread Keith Goodman
What is .T? It looks like an attribute, behaves like a method, and smells like magic. I'd like to add it to my class but don't no where to begin. ___ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy

Re: [Numpy-discussion] What is .T?

2008-05-06 Thread Robert Kern
On Tue, May 6, 2008 at 2:22 PM, Keith Goodman <[EMAIL PROTECTED]> wrote: > What is .T? It looks like an attribute, behaves like a method, and > smells like magic. I'd like to add it to my class but don't no where > to begin. It is a property. It returns the transpose of the array. If you had a .

Re: [Numpy-discussion] What is .T?

2008-05-06 Thread Keith Goodman
On Tue, May 6, 2008 at 12:28 PM, Robert Kern <[EMAIL PROTECTED]> wrote: > > On Tue, May 6, 2008 at 2:22 PM, Keith Goodman <[EMAIL PROTECTED]> wrote: > > What is .T? It looks like an attribute, behaves like a method, and > > smells like magic. I'd like to add it to my class but don't no where >

Re: [Numpy-discussion] numpy in RHEL4

2008-05-06 Thread Robert Kern
On Tue, May 6, 2008 at 4:21 AM, Bala subramanian <[EMAIL PROTECTED]> wrote: > Dear Robert, > Thank you. But i am trying to install it in a 32-bit machine only. In that > case, why dose it require 64 bit libraries. Well, judging from the paths on the command line, Python thinks it is on a 64-bit ma

Re: [Numpy-discussion] cannot edit page on scipy-dev wiki

2008-05-06 Thread Robert Kern
On Tue, May 6, 2008 at 4:33 AM, Vincent Noel <[EMAIL PROTECTED]> wrote: > Hello all, > > I wanted to fix the formatting problems on the wiki page > http://scipy.org/scipy/numpy/wiki/MaskedArrayApiChanges, so I followed > the instructions on http://scipy.org/scipy/numpy/wiki (which state "In > o

Re: [Numpy-discussion] Status Report for NumPy 1.1.0

2008-05-06 Thread Charles R Harris
On Tue, May 6, 2008 at 6:40 AM, Alan G Isaac <[EMAIL PROTECTED]> wrote: > On Tue, 6 May 2008, Jarrod Millman apparently wrote: > > open tickets that I would like everyone to take a brief > > look at: > > http://projects.scipy.org/scipy/numpy/ticket/760 > > My understanding is that my patch, which

Re: [Numpy-discussion] Status Report for NumPy 1.1.0

2008-05-06 Thread Anne Archibald
2008/5/6 Charles R Harris <[EMAIL PROTECTED]>: > > On Tue, May 6, 2008 at 6:40 AM, Alan G Isaac <[EMAIL PROTECTED]> wrote: > > > > On Tue, 6 May 2008, Jarrod Millman apparently wrote: > > > open tickets that I would like everyone to take a brief > > > look at: > > > http://projects.scipy.org/scipy/

Re: [Numpy-discussion] Status Report for NumPy 1.1.0

2008-05-06 Thread Bruce Southey
Hi, I think Ticket 605 (Incorrect behaviour of numpy.histogram) can be closed. With regards to Ticket 706 (scalar indexing of matrices -> deprecation warning) I think it should not be a blocker now but should apply the next version. There were many different issues (and threads) raised in the cont

[Numpy-discussion] lexsort

2008-05-06 Thread Eleanor
>>> a = numpy.array([[1,2,6], [2,2,8], [2,1,7],[1,1,5]]) >>> a array([[1, 2, 6], [2, 2, 8], [2, 1, 7], [1, 1, 5]]) >>> indices = numpy.lexsort(a.T) >>> a.T.take(indices,axis=-1).T array([[1, 1, 5], [1, 2, 6], [2, 1, 7], [2, 2, 8]]) The above does what I w

Re: [Numpy-discussion] lexsort

2008-05-06 Thread Anne Archibald
2008/5/6 Eleanor <[EMAIL PROTECTED]>: > >>> a = numpy.array([[1,2,6], [2,2,8], [2,1,7],[1,1,5]]) > >>> a > array([[1, 2, 6], >[2, 2, 8], >[2, 1, 7], >[1, 1, 5]]) > >>> indices = numpy.lexsort(a.T) > >>> a.T.take(indices,axis=-1).T > array([[1, 1, 5], >[1, 2, 6],

Re: [Numpy-discussion] lexsort

2008-05-06 Thread Eleanor
Anne Archibald gmail.com> writes: > > It appears that lexsort is broken in several ways, and its docstring > is misleading. > > First of all, this code is not doing quite what you describe. The > primary key here is the [5,6,7,8] column, followed by the middle and > then by the first. This is a

Re: [Numpy-discussion] Status Report for NumPy 1.1.0

2008-05-06 Thread Jarrod Millman
I have just created the 1.1.x branch: http://projects.scipy.org/scipy/numpy/changeset/5134 In about 24 hours I will tag the 1.1.0 release from the branch. At this point only critical bug fixes should be applied to the branch. The trunk is now open for 1.2 development. Thanks, -- Jarrod Millman