Re: [Numpy-discussion] What does Ignoring attempt to set 'name' (from ... mean ?

2008-05-29 Thread David Cournapeau
Robert Kern wrote: They're fine. Ignore them. They are silenced from the main setup.py with config.set_options(quiet=True) What are the cases where those message are meaningful ? I did not understand from the distutils code what kind of issues were related to this message, cheers,

[Numpy-discussion] C API : slicing?

2008-05-29 Thread Rahul Garg
Hi. Does the C api have some convenience functions for creating slices? For example : if I have a PyArrayObject *A, which represents lets say a 2d ndarray A in Python, is there a C api function to easily do the equivalent of A[a:b:c,d:e:f] ? thanks, rahul

Re: [Numpy-discussion] ANN: NumPy 1.1.0

2008-05-29 Thread Andrew Straw
Thanks, Jarrod. Should I replace the old numpy 1.0.4 information at http://www.scipy.org/Download with the 1.1.0? It's still listing 1.0.4, but I wonder if there's some compatibility with scipy 0.6 issue that should cause it to stay at 1.0.4. In either case, I think the page should be updated

[Numpy-discussion] out= corner cases

2008-05-29 Thread Keith Goodman
This looks good: import numpy as np x = np.random.rand(2,3) x.mean(None, out=x) --- ValueError: wrong shape for output But this is strange: x.std(None, out=x) 0.28264369725 x array([[ 0.54718012, 0.94296181,

Re: [Numpy-discussion] Any and all NaNs

2008-05-29 Thread Stéfan van der Walt
2008/5/23 Keith Goodman [EMAIL PROTECTED]: On Fri, May 23, 2008 at 11:44 AM, Robert Kern [EMAIL PROTECTED] wrote: On Fri, May 23, 2008 at 12:22 PM, Keith Goodman [EMAIL PROTECTED] wrote: But the first example x = mp.matrix([[mp.nan]]) x matrix([[ NaN]]) x.all() True x.any() True

Re: [Numpy-discussion] Any and all NaNs

2008-05-29 Thread Keith Goodman
On Thu, May 29, 2008 at 9:26 AM, Stéfan van der Walt [EMAIL PROTECTED] wrote: 2008/5/23 Keith Goodman [EMAIL PROTECTED]: On Fri, May 23, 2008 at 11:44 AM, Robert Kern [EMAIL PROTECTED] wrote: On Fri, May 23, 2008 at 12:22 PM, Keith Goodman [EMAIL PROTECTED] wrote: But the first example x =

Re: [Numpy-discussion] Any and all NaNs

2008-05-29 Thread Keith Goodman
On Thu, May 29, 2008 at 9:26 AM, Stéfan van der Walt [EMAIL PROTECTED] wrote: 2008/5/23 Keith Goodman [EMAIL PROTECTED]: On Fri, May 23, 2008 at 11:44 AM, Robert Kern [EMAIL PROTECTED] wrote: On Fri, May 23, 2008 at 12:22 PM, Keith Goodman [EMAIL PROTECTED] wrote: But the first example x =

[Numpy-discussion] question about histogram2d

2008-05-29 Thread Darren Dale
I have a question about histogram2d. Say I do something like: import numpy from numpy import random import pylab x=random.rand(1000)-0.5 y=random.rand(1000)*10-5 xbins=numpy.linspace(-10,10,100) ybins=numpy.linspace(-10,10,100) h,x,y=numpy.histogram2d(x,y,bins=[xbins,ybins])

Re: [Numpy-discussion] Any and all NaNs

2008-05-29 Thread Pauli Virtanen
to, 2008-05-29 kello 10:53 -0700, Keith Goodman kirjoitti: On Thu, May 29, 2008 at 9:26 AM, Stéfan van der Walt [EMAIL PROTECTED] wrote: 2008/5/23 Keith Goodman [EMAIL PROTECTED]: On Fri, May 23, 2008 at 11:44 AM, Robert Kern [EMAIL PROTECTED] wrote: [clip] That makes sense. Hopefully it

[Numpy-discussion] Question for Travis

2008-05-29 Thread Charles R Harris
Travis, What are the fundamental types for ndarrays? We have the c types, 'bBhHiIlLqQfdg', together with the boolean and complex types. Then we have types defined by length, int8, uint8, etc. The long types change length going from 32 to 64 bit machines, so there can be a couple of c-types

[Numpy-discussion] From float to records

2008-05-29 Thread Pierre GM
All, I have a set of arrays that I want to transform to records. Viewing them as a new dtype is usually sufficient, but fails occasionally. Here's an example: #--- import numpy as np testdtype = [('a',float),('b',float),('c',float)] test =

Re: [Numpy-discussion] From float to records

2008-05-29 Thread Charles R Harris
On Thu, May 29, 2008 at 2:05 PM, Pierre GM [EMAIL PROTECTED] wrote: All, I have a set of arrays that I want to transform to records. Viewing them as a new dtype is usually sufficient, but fails occasionally. Here's an example: #--- import numpy as np

Re: [Numpy-discussion] From float to records

2008-05-29 Thread Pierre GM
On Thursday 29 May 2008 16:25:24 Charles R Harris wrote: * Could somebody explain me what goes wrong in the second case (transpose+view) ? Is it because the transpose doesn't own the data ? * Is there a way to transform my (3,5) array into a (5,) recordarray without a copy ? I don't

Re: [Numpy-discussion] ANN: NumPy 1.1.0

2008-05-29 Thread Charles R Harris
On Thu, May 29, 2008 at 3:37 PM, Jarrod Millman [EMAIL PROTECTED] wrote: On Thu, May 29, 2008 at 7:57 AM, Andrew Straw [EMAIL PROTECTED] wrote: Should I replace the old numpy 1.0.4 information at http://www.scipy.org/Download with the 1.1.0? It's still listing 1.0.4, but I wonder if

Re: [Numpy-discussion] ANN: NumPy 1.1.0

2008-05-29 Thread Jarrod Millman
On Thu, May 29, 2008 at 2:59 PM, Charles R Harris [EMAIL PROTECTED] wrote: No, I will take care of it. I was away from home and decided to make a relatively quiet release, since I might not be able to respond in case their were problems. I only sent the email to the NumPy discussion list

[Numpy-discussion] New documentation web application

2008-05-29 Thread Stéfan van der Walt
Hi all, The NumPy documentation project has taken another leap forward! Pauli Virtanen has, in a week of superhuman coding, produced a web application that enhances the work-flow and editing experience of NumPy docstrings on the web. Unfortunately, this means that those of you who signed up

Re: [Numpy-discussion] New documentation web application

2008-05-29 Thread Jarrod Millman
On Thu, May 29, 2008 at 3:28 PM, Stéfan van der Walt [EMAIL PROTECTED] wrote: The NumPy documentation project has taken another leap forward! Pauli Virtanen has, in a week of superhuman coding, produced a web application that enhances the work-flow and editing experience of NumPy docstrings

Re: [Numpy-discussion] New documentation web application

2008-05-29 Thread Anne Archibald
2008/5/29 Jarrod Millman [EMAIL PROTECTED]: On Thu, May 29, 2008 at 3:28 PM, Stéfan van der Walt [EMAIL PROTECTED] wrote: The NumPy documentation project has taken another leap forward! Pauli Virtanen has, in a week of superhuman coding, produced a web application that enhances the

Re: [Numpy-discussion] New documentation web application

2008-05-29 Thread Nathan Bell
On Thu, May 29, 2008 at 5:28 PM, Stéfan van der Walt [EMAIL PROTECTED] wrote: Hi all, The NumPy documentation project has taken another leap forward! Pauli Virtanen has, in a week of superhuman coding, produced a web application that enhances the work-flow and editing experience of NumPy

[Numpy-discussion] Question about indexing

2008-05-29 Thread Raul Kompass
I'm new to using numpy. Today I experimented a bit with indexing motivated by the finding that although a[a0.5] and a[where(a0.5)] give the same expected result (elements of a greater than 0.5) a[argwhere(a0.5)] results in something else (rows of a in different order). I tried to figure out

Re: [Numpy-discussion] Question about indexing

2008-05-29 Thread Robin
On Fri, May 30, 2008 at 12:36 AM, Raul Kompass [EMAIL PROTECTED] wrote: I'm new to using numpy. Today I experimented a bit with indexing motivated by the finding that although a[a0.5] and a[where(a0.5)] give the same expected result (elements of a greater than 0.5) a[argwhere(a0.5)] results

Re: [Numpy-discussion] Question about indexing

2008-05-29 Thread Robin
On Fri, May 30, 2008 at 12:57 AM, Robin [EMAIL PROTECTED] wrote: You are indexing here with a 1d list [0,1]. Since you don't provide a column index you get rows 0 and 1. If you do a[ [0,1] , [0,1] ] then you get element [0,0] and element [0,1]. Whoops - you get [0,0] and [1,1]. Robin

Re: [Numpy-discussion] Question about indexing

2008-05-29 Thread Keith Goodman
On Thu, May 29, 2008 at 4:36 PM, Raul Kompass [EMAIL PROTECTED] wrote: I'm new to using numpy. Today I experimented a bit with indexing motivated by the finding that although a[a0.5] and a[where(a0.5)] give the same expected result (elements of a greater than 0.5) a[argwhere(a0.5)] results

[Numpy-discussion] Tutorials at Scipy 2008

2008-05-29 Thread Fernando Perez
[ This is meant as a heads-up here, please keep the discussion on the SciPy user list so we can focus the conversation in one list only. ] Hi all, Travis Oliphant and myself have signed up to coordinate the tutorials sessions at this year's SciPy conference. Our tentative plan is described

Re: [Numpy-discussion] Question about indexing

2008-05-29 Thread Keith Goodman
On Thu, May 29, 2008 at 6:32 PM, Alan G Isaac [EMAIL PROTECTED] wrote: On Thu, 29 May 2008, Keith Goodman apparently wrote: a[[0,1]] That one looks odd. But it is just shorthand for: a[[0,1],:] Do you mean that ``a[[0,1],:]`` is a more primitive expression than ``a[[0,1]]``? In what

Re: [Numpy-discussion] Question about indexing

2008-05-29 Thread Alan G Isaac
On Thu, 29 May 2008, Keith Goodman apparently wrote: a[[0,1]] That one looks odd. But it is just shorthand for: a[[0,1],:] On Thu, May 29, 2008 at 6:32 PM, Alan G Isaac [EMAIL PROTECTED] wrote: Do you mean that ``a[[0,1],:]`` is a more primitive expression than ``a[[0,1]]``? In what

Re: [Numpy-discussion] Tutorials at Scipy 2008

2008-05-29 Thread Carl Trachte
On 5/29/08, Fernando Perez [EMAIL PROTECTED] wrote: [ This is meant as a heads-up here, please keep the discussion on the SciPy user list so we can focus the conversation in one list only. ] Hi all, Travis Oliphant and myself have signed up to coordinate the tutorials sessions at this

Re: [Numpy-discussion] Question about indexing

2008-05-29 Thread Keith Goodman
On Thu, May 29, 2008 at 8:50 PM, Alan G Isaac [EMAIL PROTECTED] wrote: Is ``a[[0,1]]`` completely equivalent to ``a[[0,1],...]`` and ``a[[0,1],:]``? They look, smell, and taste the same. But I can't read array's __getitem__ since it is in C instead of python. np.index_exp[[0,1]] ([0, 1],)