[Numpy-discussion] Openmp support (was numpy's future (1.1 and beyond): which direction(s) ?)

2008-03-21 Thread David Cournapeau
Anne Archibald wrote: > > There was some discussion of this recently. The most direct approach > to the problem is to annotate some or all of numpy's inner C loops > with OpenMP constructs, then provide some python functions to control > the degree of parallelism OpenMP uses. This would transparent

Re: [Numpy-discussion] Vectorize leak fixed (and sage-reported leak fixed as well).

2008-03-21 Thread Travis E. Oliphant
Michael.Abshoff wrote: > Travis E. Oliphant wrote: > >> Hello all, >> >> Much thanks is deserved by the people who have been chasing down and >> fixing reference count problems in NumPy. Two of them are related to >> object arrays. >> >> So, if you have been having memory leak problems with

Re: [Numpy-discussion] Vectorize leak fixed (and sage-reported leak fixed as well).

2008-03-21 Thread Michael.Abshoff
Travis E. Oliphant wrote: > Hello all, > > Much thanks is deserved by the people who have been chasing down and > fixing reference count problems in NumPy. Two of them are related to > object arrays. > > So, if you have been having memory leak problems with object arrays > (vectorize uses o

[Numpy-discussion] Vectorize leak fixed (and sage-reported leak fixed as well).

2008-03-21 Thread Travis E. Oliphant
Hello all, Much thanks is deserved by the people who have been chasing down and fixing reference count problems in NumPy. Two of them are related to object arrays. So, if you have been having memory leak problems with object arrays (vectorize uses object arrays, BTW), you should try out th

Re: [Numpy-discussion] Improving Docs on Wiki

2008-03-21 Thread Joris De Ridder
On 21 Mar 2008, at 18:22, Joe Harrington wrote: > What you have brought up is really a documentation problem: how do I > find the name of the routine I want? One way of dealing with this, could be the implementation of a "doc()" function in numpy that helps you to find what you want. A (still

Re: [Numpy-discussion] dunno what array operation I'm looking for...

2008-03-21 Thread Hoyt Koepke
Try result = A[1:] - A[:-1] --Hoyt On Fri, Mar 21, 2008 at 7:43 PM, Chris Withers <[EMAIL PROTECTED]> wrote: > Hi All, > > Say I have an array like: > > >>> measurements = array([100,109,115,117]) > > What do I do to it to get: > > array([9, 6, 2]) > > Is the following really the best way?

Re: [Numpy-discussion] dunno what array operation I'm looking for...

2008-03-21 Thread Joris De Ridder
numpy.diff See http://www.scipy.org/Numpy_Example_List J. On 22 Mar 2008, at 03:43, Chris Withers wrote: > Hi All, > > Say I have an array like: > measurements = array([100,109,115,117]) > > What do I do to it to get: > > array([9, 6, 2]) > > Is the following really the best way? >

[Numpy-discussion] dunno what array operation I'm looking for...

2008-03-21 Thread Chris Withers
Hi All, Say I have an array like: >>> measurements = array([100,109,115,117]) What do I do to it to get: array([9, 6, 2]) Is the following really the best way? >>> result = [] >>> for i in range(1,len(measurements)): ... result.append(measurements[i]-measurements[i-1]) ... >>> array(res

Re: [Numpy-discussion] matrices in 1.1

2008-03-21 Thread Charles R Harris
2008/3/21 Alan G Isaac <[EMAIL PROTECTED]>: > On Sat, 22 Mar 2008, Nadav Horesh apparently wrote: > A*v > ... > > ValueError: objects are not aligned > > This is just how I want matrices to act! > > If A is m׳n, then v should be n׳1 > for A*v to be defined. Anything else > is trouble wait

Re: [Numpy-discussion] matrices in 1.1

2008-03-21 Thread Alan G Isaac
On Sat, 22 Mar 2008, Nadav Horesh apparently wrote: A*v ... > ValueError: objects are not aligned This is just how I want matrices to act! If A is m׳n, then v should be n׳1 for A*v to be defined. Anything else is trouble waiting to happen. But it seems that Charles's proposal would ma

Re: [Numpy-discussion] bug with with fill_values in masked arrays?

2008-03-21 Thread Pierre GM
On Friday 21 March 2008 12:55:11 Chris Withers wrote: > Pierre GM wrote: > > On Wednesday 19 March 2008 19:47:37 Matt Knox wrote: > >>> 1. why am I not getting my NaN's back? > > > > Because they're gone when you create your masked array. > > Really? At least one other post has disagreed with that.

Re: [Numpy-discussion] bug with with fill_values in masked arrays?

2008-03-21 Thread Pierre GM
On Friday 21 March 2008 12:52:45 Chris Withers wrote: > Pierre GM wrote: > >> This sucks to the point of feeling like a bug :-( > > > > It is not. > > Ignoring the fill value of masked array feels like a bug to me... You're right with masked arrays, but here we're talking the masked singleton, a

Re: [Numpy-discussion] matrices in 1.1

2008-03-21 Thread Nadav Horesh
One problem with the matrix class is that it follows matlab way too much. For example: >>> a = arange(9).reshape(3,3) >>> A = asmatrix(a) >>> v = arange(3) >>> dot(a, v) array([ 5, 14, 23]) >>> A*v Traceback (most recent call last): File "", line 1, in A*v File "C:\Python25\lib\site-pac

Re: [Numpy-discussion] matrices in 1.1

2008-03-21 Thread Travis E. Oliphant
Charles R Harris wrote: > > > On Fri, Mar 21, 2008 at 1:57 PM, Alan G Isaac <[EMAIL PROTECTED] > > wrote: > > On Fri, 21 Mar 2008, Nadav Horesh apparently wrote: > > But asmatrix returns a matrix object and any subsequent > > operation of it returns a matrix.

Re: [Numpy-discussion] numpy's future (1.1 and beyond): which direction(s) ?

2008-03-21 Thread Anne Archibald
On 21/03/2008, Gnata Xavier <[EMAIL PROTECTED]> wrote: > Something like http://idlastro.gsfc.nasa.gov/idl_html_help/TOTAL.html > (Thread Pool Keywords) would be nice. > A "total like" function could be a great pathfinder a put threads into > numpy keeping the things as simple as they should re

Re: [Numpy-discussion] matrices in 1.1

2008-03-21 Thread Charles R Harris
On Fri, Mar 21, 2008 at 1:57 PM, Alan G Isaac <[EMAIL PROTECTED]> wrote: > On Fri, 21 Mar 2008, Nadav Horesh apparently wrote: > > But asmatrix returns a matrix object and any subsequent > > operation of it returns a matrix. What I am thinking about > > is a convenient way to apply matrix operatio

Re: [Numpy-discussion] matrices in 1.1

2008-03-21 Thread Alan G Isaac
On Fri, 21 Mar 2008, Nadav Horesh apparently wrote: > But asmatrix returns a matrix object and any subsequent > operation of it returns a matrix. What I am thinking about > is a convenient way to apply matrix operation on an array. I suspect what you are really wanting is a way for NumPy to de

Re: [Numpy-discussion] Improving Docs on Wiki

2008-03-21 Thread Gary Strangman
>>> http://projects.scipy.org/scipy/numpy/wiki/CodingStyleGuidelines >> >> I realize this is a bit of a johnny-come-lately comment, but I was >> surprised to see that the list of sections does not seem to include the >> single most common reason I usually try to access a doc string ... the >> fu

Re: [Numpy-discussion] Improving Docs on Wiki

2008-03-21 Thread Pauli Virtanen
pe, 2008-03-21 kello 07:53 -0400, Gary Strangman kirjoitti: > > 4. Update the docstring, using the format suggested in > > > > http://projects.scipy.org/scipy/numpy/wiki/CodingStyleGuidelines > > I realize this is a bit of a johnny-come-lately comment, but I was > surprised to see that the list

Re: [Numpy-discussion] bug with with fill_values in maske d arrays?

2008-03-21 Thread Matt Knox
Chris, The behaviour you are seeing is intentional. Pierre is correct in asserting that it is not a bug. Now, you may disagree with the behaviour, but the behaviour is by design and is not a bug. Perhaps you are misunderstanding how to use masked arrays, which is understandable because the documen

Re: [Numpy-discussion] matrices in 1.1

2008-03-21 Thread Nadav Horesh
But asmatrix returns a matrix object and any subsequent operation of it returns a matrix. What I am thinking about is a convenient way to apply matrix operation on an array. BTW, A matrix is just a rank 2 tensor, so matrix (tensor) algebra can be applied to an arbitrary rank tensor, for exampl

Re: [Numpy-discussion] Import numeric error

2008-03-21 Thread dieter h
On Fri, Mar 21, 2008 at 2:32 PM, Aswad Gurjar <[EMAIL PROTECTED]> wrote: > Hello, > > I have installed numpy-1.0.4.win32-py2.5 on windows machine for python > 2.5.1.But when I enter command > >>import Numeric > I get following error: > Traceback (most recent call last): > File "", line 1, in >

[Numpy-discussion] Import numeric error

2008-03-21 Thread Aswad Gurjar
Hello, I have installed numpy-1.0.4.win32-py2.5 on windows machine for python 2.5.1.But when I enter command >>import Numeric I get following error: Traceback (most recent call last): File "", line 1, in import Numeric ImportError: No module named Numeric Can anybody please help me to remo

Re: [Numpy-discussion] matrices in 1.1

2008-03-21 Thread Alan G Isaac
On Fri, 21 Mar 2008, Stéfan van der Walt apparently wrote: > The last I remember, we considered adding RowVector, > ColumnVector and letting slices out of a matrix either be > one of those or a matrix itself. There was a subsequent discussion. > I simply don't see a Matrix as a container of nd

Re: [Numpy-discussion] Improving Docs on Wiki

2008-03-21 Thread Joe Harrington
> Is it perhaps possible to make all numpy functions accessible in > submodules (in addition to in numpy, for backwards compatibility) and > then promote accessing them that way? I would caution on breaking functionality out into too many categories. It is *very* cumbersome to constantly import l

Re: [Numpy-discussion] bug with with fill_values in masked arrays?

2008-03-21 Thread Chris Withers
Pierre GM wrote: > On Wednesday 19 March 2008 19:47:37 Matt Knox wrote: >>> 1. why am I not getting my NaN's back? > > Because they're gone when you create your masked array. Really? At least one other post has disagreed with that. And it does seem odd that a value, even if it's a nan, would be

Re: [Numpy-discussion] bug with with fill_values in masked arrays?

2008-03-21 Thread Chris Withers
Pierre GM wrote: >> This sucks to the point of feeling like a bug :-( > > It is not. Ignoring the fill value of masked array feels like a bug to me... >> Why is it desirable for it to behave like this? > > Because that way, you can compare anything to masked and see whether a value > is masked

Re: [Numpy-discussion] Improving Docs on Wiki

2008-03-21 Thread Stéfan van der Walt
On Fri, Mar 21, 2008 at 5:00 PM, Anne Archibald <[EMAIL PROTECTED]> wrote: > On 21/03/2008, Stéfan van der Walt <[EMAIL PROTECTED]> wrote: > > On Fri, Mar 21, 2008 at 2:47 PM, Anne Archibald > > <[EMAIL PROTECTED]> wrote: > > > > Is it perhaps possible to make all numpy functions accessible in

Re: [Numpy-discussion] numpy's future (1.1 and beyond): which direction(s) ?

2008-03-21 Thread Gnata Xavier
David Cournapeau wrote: > Hi, > > numpy 1.0.5 is on the way, and I was wondering about numpy's future. I > myself have some ideas about what could be done; has there been any > discussion behind what is on 1.1 trac's roadmap ? Some of the things I > would like to see myself: > - a frame

Re: [Numpy-discussion] Improving Docs on Wiki

2008-03-21 Thread Anne Archibald
On 21/03/2008, Stéfan van der Walt <[EMAIL PROTECTED]> wrote: > On Fri, Mar 21, 2008 at 2:47 PM, Anne Archibald > <[EMAIL PROTECTED]> wrote: > > Is it perhaps possible to make all numpy functions accessible in > > submodules (in addition to in numpy, for backwards compatibility) and > > then

Re: [Numpy-discussion] matrices in 1.1

2008-03-21 Thread Stéfan van der Walt
On Fri, Mar 21, 2008 at 3:23 PM, Alan G Isaac <[EMAIL PROTECTED]> wrote: > On Fri, 21 Mar 2008, Nadav Horesh apparently wrote: > > I would like to see a unification of matrices and arrays. > > I often do calculation which involve both array processing > > and linear algebra, and the current solu

Re: [Numpy-discussion] Improving Docs on Wiki

2008-03-21 Thread Stéfan van der Walt
On Fri, Mar 21, 2008 at 2:47 PM, Anne Archibald <[EMAIL PROTECTED]> wrote: > On 21/03/2008, Sebastian Haase <[EMAIL PROTECTED]> wrote: > > > Comment: I have read the module- or directory-name "core" many times > > on this list, however: Who really knows where a given functions > > belongs ?

Re: [Numpy-discussion] Improving Docs on Wiki

2008-03-21 Thread Stéfan van der Walt
Hi Gary On Fri, Mar 21, 2008 at 12:53 PM, Gary Strangman <[EMAIL PROTECTED]> wrote: > > > 4. Update the docstring, using the format suggested in > > > > http://projects.scipy.org/scipy/numpy/wiki/CodingStyleGuidelines > > I realize this is a bit of a johnny-come-lately comment, but I was >

Re: [Numpy-discussion] Improving Docs on Wiki

2008-03-21 Thread Stéfan van der Walt
On Fri, Mar 21, 2008 at 1:54 PM, Sebastian Haase <[EMAIL PROTECTED]> wrote: > read relow... > > On Fri, Mar 21, 2008 at 11:21 AM, Stéfan van der Walt <[EMAIL PROTECTED]> > wrote: > > Hi Dieter > > > > On Fri, Mar 21, 2008 at 9:55 AM, <[EMAIL PROTECTED]> wrote: > > > I want to know if creatin

Re: [Numpy-discussion] matrices in 1.1

2008-03-21 Thread Alan G Isaac
On Fri, 21 Mar 2008, Nadav Horesh apparently wrote: > I would like to see a unification of matrices and arrays. > I often do calculation which involve both array processing > and linear algebra, and the current solution of having > function like dot and inv is not aesthetic. Switching > between

Re: [Numpy-discussion] Improving Docs on Wiki

2008-03-21 Thread Anne Archibald
On 21/03/2008, Sebastian Haase <[EMAIL PROTECTED]> wrote: > Comment: I have read the module- or directory-name "core" many times > on this list, however: Who really knows where a given functions > belongs ? Isn't that mostly only the numpy svn commiters ? > In other words, using only the pyth

Re: [Numpy-discussion] Improving Docs on Wiki

2008-03-21 Thread dieter h
On Fri, Mar 21, 2008 at 8:54 AM, Sebastian Haase <[EMAIL PROTECTED]> wrote: > read relow... > > NumpyDocstrings category on the wiki, and suggest that we organise the > > functions underneath it according to their numpy subpackage, e.g. > > > > scipy.org/NumpyDocstrings/core/sort > > > > If y

Re: [Numpy-discussion] Improving Docs on Wiki

2008-03-21 Thread Sebastian Haase
read relow... On Fri, Mar 21, 2008 at 11:21 AM, Stéfan van der Walt <[EMAIL PROTECTED]> wrote: > Hi Dieter > > On Fri, Mar 21, 2008 at 9:55 AM, <[EMAIL PROTECTED]> wrote: > > I want to know if creating individual documentation for each numpy > > routine on the scipy.org wiki would, for some admi

Re: [Numpy-discussion] Help needed with numpy 10.5 release blockers

2008-03-21 Thread Joris De Ridder
On 21 Mar 2008, at 12:29, Sebastian Haase wrote: > ... and what does the "p" stand for in N.intp > It stands for "pointer". An intp is an integer large enough to contain a pointer address. J. Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm ___

Re: [Numpy-discussion] Improving Docs on Wiki

2008-03-21 Thread Gary Strangman
> 4. Update the docstring, using the format suggested in > > http://projects.scipy.org/scipy/numpy/wiki/CodingStyleGuidelines I realize this is a bit of a johnny-come-lately comment, but I was surprised to see that the list of sections does not seem to include the single most common reason I

Re: [Numpy-discussion] Help needed with numpy 10.5 release blockers

2008-03-21 Thread Sebastian Haase
I think the bug was referring to the fact that some types have duplicate names *explicitly* containing the letter "c" -- as in >>> repr(N.intc) '' Is this supposed to be consistent naming scheme (i.e. any C type "" is accessible as "N.c") ? Then c float-type should consequently be named N.float

Re: [Numpy-discussion] Help needed with numpy 10.5 release blockers

2008-03-21 Thread Sebastian Haase
I think the bug was referring to the fact that some types have duplicate names *explicitly* containing the letter "c" -- as in >>> repr(N.intc) '' Is this supposed to be consistent naming scheme (i.e. any C type "" is accessible as "N.c") ? Then c float-type should consequently be named N.float

Re: [Numpy-discussion] NumPy 1.0.5 almost ready

2008-03-21 Thread Stéfan van der Walt
Thank you, Pauli. Tested and applied in r4899. Regards Stéfan On Thu, Mar 20, 2008 at 9:27 PM, Pauli Virtanen <[EMAIL PROTECTED]> wrote: > > to, 2008-03-20 kello 21:09 +0100, Matthieu Brucher kirjoitti: > > > Well, it is not completely solved. With the patch, the reference count > > keeps on r

Re: [Numpy-discussion] Improving Docs on Wiki

2008-03-21 Thread Stéfan van der Walt
Hi Dieter On Fri, Mar 21, 2008 at 9:55 AM, <[EMAIL PROTECTED]> wrote: > I want to know if creating individual documentation for each numpy > routine on the scipy.org wiki would, for some administrative reason > (or other) be frowned upon. Here is an example of what I'd like to do > for all of

Re: [Numpy-discussion] NumPy 1.0.5 almost ready

2008-03-21 Thread Matthieu Brucher
I confirm that the reference count is consistent when trying the exemple given in the first post of the ticket (Ubuntu 7.10, gcc 4.1.3, Python 2.5.1 ). Matthieu 2008/3/21, Jarrod Millman <[EMAIL PROTECTED]>: > > On Thu, Mar 20, 2008 at 1:27 PM, Pauli Virtanen <[EMAIL PROTECTED]> wrote: > > to, 2

Re: [Numpy-discussion] numpy's future (1.1 and beyond): whichdirection(s) ?

2008-03-21 Thread Matthieu Brucher
Hi, I don't understand why an unification would simplify stuff, it would make everything so much more difficult :| Instead of dot, you would have a mult() function to multiply element by element, the same for inv(), so much less readable when using arrays when arrays are so much more general and g

Re: [Numpy-discussion] NumPy 1.0.5 almost ready

2008-03-21 Thread Jarrod Millman
On Thu, Mar 20, 2008 at 1:27 PM, Pauli Virtanen <[EMAIL PROTECTED]> wrote: > to, 2008-03-20 kello 21:09 +0100, Matthieu Brucher kirjoitti: > > Well, it is not completely solved. With the patch, the reference count > > keeps on raising, but as it is for Python scalars, it is not a > > problem, bu

Re: [Numpy-discussion] numpy's future (1.1 and beyond): which direction(s) ?

2008-03-21 Thread Jarrod Millman
On Thu, Mar 20, 2008 at 9:35 PM, David Cournapeau <[EMAIL PROTECTED]> wrote: > numpy 1.0.5 is on the way, and I was wondering about numpy's future. I > myself have some ideas about what could be done; has there been any > discussion behind what is on 1.1 trac's roadmap ? Some of the thing

Re: [Numpy-discussion] numpy's future (1.1 and beyond): whichdirection(s) ?

2008-03-21 Thread Nadav Horesh
I would like to see a unification of matrices and arrays. I often do calculation which involve both array processing and linear algebra, and the current solution of having function like dot and inv is not aesthetic. Switching between array and matrix types (or using .A attribute of a matrix) is

Re: [Numpy-discussion] Improving Docs on Wiki

2008-03-21 Thread Robert Kern
On Fri, Mar 21, 2008 at 3:55 AM, <[EMAIL PROTECTED]> wrote: > Hi, > > I want to know if creating individual documentation for each numpy > routine on the scipy.org wiki would, for some administrative reason > (or other) be frowned upon. Here is an example of what I'd like to do > for all of nu

[Numpy-discussion] Improving Docs on Wiki

2008-03-21 Thread vel . accel
Hi, I want to know if creating individual documentation for each numpy routine on the scipy.org wiki would, for some administrative reason (or other) be frowned upon. Here is an example of what I'd like to do for all of numpy's routines. http://www.scipy.org/sort. After each routine is properly d