Re: [Numpy-discussion] Faster

2008-05-06 Thread Damian Eads
Hi, Looks like a fun discussion: it's too bad for me I did not join it earlier. My first try at scipy-cluster was completely in Python. Like you, I also tried to find the most efficient way to transform the distance matrix when joining two clusters. Eventually my data sets became big enough

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:

[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

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 still is,

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: Dear

[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

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 aligned

[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.

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. Here is

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

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 zeros

[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

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 array.

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], [ 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. dates).

[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

[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

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 to

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

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 order to

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/numpy/ticket/760

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

[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 want,

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], [2, 1, 7],

Re: [Numpy-discussion] lexsort

2008-05-06 Thread Eleanor
Anne Archibald peridot.faceted at 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