Re: [Numpy-discussion] Unpleasant behavior with poly1d and numpy scalar multiplication

2010-02-13 Thread Fernando Perez
Mmh, today I got bitten by this again. It took me a while to figure out what was going on while trying to construct a pedagogical example manipulating numpy poly1d objects, and after searching for 'poly1d multiplication float' in my gmail inbox, the *only* post I found was this old one of mine,

Re: [Numpy-discussion] Unpleasant behavior with poly1d and numpy scalar multiplication

2010-02-13 Thread josef . pktd
On Sat, Feb 13, 2010 at 3:11 AM, Fernando Perez fperez@gmail.com wrote: Mmh, today I got bitten by this again.  It took me a while to figure out what was going on while trying to construct a pedagogical example manipulating numpy poly1d objects, and after searching for 'poly1d

[Numpy-discussion] Multithreading support

2010-02-13 Thread Wolfgang Kerzendorf
Dear all, I don't know much about parallel programming so I don't know how easy it is to do that: When doing simple arrray operations like adding two arrays or adding a number to the array, is numpy able to put this on multiple cores? I have tried it but it doesnt seem to do that. Is there a

Re: [Numpy-discussion] Multithreading support

2010-02-13 Thread David Cournapeau
On Sat, Feb 13, 2010 at 6:20 PM, Wolfgang Kerzendorf wkerzend...@googlemail.com wrote: Dear all, I don't know much about parallel programming so I don't know how easy it is to do that: When doing simple arrray operations like adding two arrays or adding a number to the array, is numpy able

Re: [Numpy-discussion] Multithreading support

2010-02-13 Thread René Dudfield
hi, see: http://numcorepy.blogspot.com/ They see a benefit when working with large arrays. Otherwise you are limited by memory - and the extra cores don't help with memory bandwidth. cheers, On Sat, Feb 13, 2010 at 2:20 PM, David Cournapeau courn...@gmail.comwrote: On Sat, Feb 13, 2010 at

[Numpy-discussion] A few notes...

2010-02-13 Thread Alcides Viamontes Esquivel
Hello everybody. I has been working with Numpy, I have enjoyed it a lot. Such a great idea to let you do things in Python while the real number-crunching code runs in C. I had to figure out how to do a few things with indexing and would like to share it, you might check it at

Re: [Numpy-discussion] Unpleasant behavior with poly1d and numpy scalar multiplication

2010-02-13 Thread Charles R Harris
On Sat, Feb 13, 2010 at 1:41 AM, josef.p...@gmail.com wrote: On Sat, Feb 13, 2010 at 3:11 AM, Fernando Perez fperez@gmail.com wrote: Mmh, today I got bitten by this again. It took me a while to figure out what was going on while trying to construct a pedagogical example manipulating

Re: [Numpy-discussion] Unpleasant behavior with poly1d and numpy scalar multiplication

2010-02-13 Thread Charles R Harris
On Sat, Feb 13, 2010 at 1:11 AM, Fernando Perez fperez@gmail.comwrote: Mmh, today I got bitten by this again. It took me a while to figure out what was going on while trying to construct a pedagogical example manipulating numpy poly1d objects, and after searching for 'poly1d

[Numpy-discussion] It's be nice if rint

2010-02-13 Thread Neal Becker
It's be nice if rint could directly return a dtype of my choice (an int- type, such as np.int32). ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion

[Numpy-discussion] numpy 2.0, what else to do?

2010-02-13 Thread Charles R Harris
Hi All, Since there has been talk of deprecating the numarray and numeric compatibility parts of numpy for the upcoming 2.0 release I thought maybe we could consider a few other changes. First, numpy imports a ton of stuff by default and this is maintained for backward compatibility. Would this

Re: [Numpy-discussion] Unpleasant behavior with poly1d and numpy scalar multiplication

2010-02-13 Thread Fernando Perez
On Sat, Feb 13, 2010 at 10:34 AM, Charles R Harris charlesr.har...@gmail.com wrote: The new polynomials don't have that problem. In [1]: from numpy.polynomial import Polynomial as Poly In [2]: p = Poly([1,2]) Aha, great! Many thanks, I can tell my students this, and just show them the

Re: [Numpy-discussion] Unpleasant behavior with poly1d and numpy scalar multiplication

2010-02-13 Thread Charles R Harris
On Sat, Feb 13, 2010 at 10:04 AM, Fernando Perez fperez@gmail.comwrote: On Sat, Feb 13, 2010 at 10:34 AM, Charles R Harris charlesr.har...@gmail.com wrote: The new polynomials don't have that problem. In [1]: from numpy.polynomial import Polynomial as Poly In [2]: p = Poly([1,2])

Re: [Numpy-discussion] Unpleasant behavior with poly1d and numpy scalar multiplication

2010-02-13 Thread Charles R Harris
On Sat, Feb 13, 2010 at 10:24 AM, Charles R Harris charlesr.har...@gmail.com wrote: On Sat, Feb 13, 2010 at 10:04 AM, Fernando Perez fperez@gmail.comwrote: On Sat, Feb 13, 2010 at 10:34 AM, Charles R Harris charlesr.har...@gmail.com wrote: The new polynomials don't have that problem.

Re: [Numpy-discussion] numpy 2.0, what else to do?

2010-02-13 Thread Christopher Barker
Charles R Harris wrote: numpy imports a ton of stuff by default and this is maintained for backward compatibility. Would this be a reasonable time to change that and require explicit imports for things like fft? absolutely! I'd love far more minimalist imports. This is particularly an

Re: [Numpy-discussion] numpy 2.0, what else to do?

2010-02-13 Thread Joe Harrington
Chuck Harris writes (on numpy-discussion): Since there has been talk of deprecating the numarray and numeric compatibility parts of numpy for the upcoming 2.0 release I thought maybe we could consider a few other changes. First, numpy imports a ton of stuff by default and this is maintained

Re: [Numpy-discussion] numpy 2.0, what else to do?

2010-02-13 Thread Charles R Harris
On Sat, Feb 13, 2010 at 11:23 AM, Joe Harrington j...@physics.ucf.edu wrote: Chuck Harris writes (on numpy-discussion): Since there has been talk of deprecating the numarray and numeric compatibility parts of numpy for the upcoming 2.0 release I thought maybe we could consider a few

Re: [Numpy-discussion] numpy 2.0, what else to do?

2010-02-13 Thread Travis Oliphant
-1 -- (mobile phone of) Travis Oliphant Enthought, Inc. 1-512-536-1057 http://www.enthought.com On Feb 13, 2010, at 10:24 AM, Charles R Harris charlesr.har...@gmail.com wrote: Hi All, Since there has been talk of deprecating the numarray and numeric compatibility parts of numpy for the

Re: [Numpy-discussion] numpy 2.0, what else to do?

2010-02-13 Thread Travis Oliphant
This is exactly what I was worried about with calling the next release 2.0. This is not the time to change all the things we wish were done differently. The release is scheduled for 3 weeks. Travis -- (mobile phone of) Travis Oliphant Enthought, Inc. 1-512-536-1057

Re: [Numpy-discussion] numpy 2.0, what else to do?

2010-02-13 Thread Xavier Gnata
On 02/13/2010 07:31 PM, Charles R Harris wrote: On Sat, Feb 13, 2010 at 11:23 AM, Joe Harrington j...@physics.ucf.edu mailto:j...@physics.ucf.edu wrote: Chuck Harris writes (on numpy-discussion): Since there has been talk of deprecating the numarray and numeric compatibility

Re: [Numpy-discussion] numpy 2.0, what else to do?

2010-02-13 Thread Xavier Gnata
IMHO 2.0 should support python3. That would be a major step and a good reason to call it 2.0. Xavier This is exactly what I was worried about with calling the next release 2.0. This is not the time to change all the things we wish were done differently. The release is scheduled for 3

Re: [Numpy-discussion] numpy 2.0, what else to do?

2010-02-13 Thread Matthew Brett
Hi, On Sat, Feb 13, 2010 at 11:53 AM, Xavier Gnata xavier.gn...@gmail.com wrote: IMHO 2.0 should support python3. That would be a major step and a good reason to call it 2.0. I agree with Travis, I think we should try not to attach too much importance to the big number change, release 2.0 just

Re: [Numpy-discussion] numpy 2.0, what else to do?

2010-02-13 Thread Charles R Harris
On Sat, Feb 13, 2010 at 12:49 PM, Travis Oliphant oliph...@enthought.comwrote: This is exactly what I was worried about with calling the next release 2.0. This is not the time to change all the things we wish were done differently. Do you think it would be reasonable to make such changes

Re: [Numpy-discussion] numpy 2.0, what else to do?

2010-02-13 Thread Pauli Virtanen
We will most likely have experimental py3 support in 2.0. If you, or someone else wishes to help bringing 2.0 to fully work with Py3, now is a very good time to step up. How to give a hand: 1. Get my latest py3 branch from http://github.com/pv/numpy-work/tree/py3k Read doc/py3k.txt 2. Get

Re: [Numpy-discussion] numpy 2.0, what else to do?

2010-02-13 Thread Jarrod Millman
On Sat, Feb 13, 2010 at 1:49 PM, Travis Oliphant oliph...@enthought.com wrote: This is exactly what I was worried about with calling the next release 2.0. This is not the time to change all the things we wish were done differently. The release is scheduled for 3 weeks. Hey Travis, I agree

Re: [Numpy-discussion] numpy 2.0, what else to do?

2010-02-13 Thread Xavier Gnata
On 02/13/2010 09:28 PM, Pauli Virtanen wrote: We will most likely have experimental py3 support in 2.0. If you, or someone else wishes to help bringing 2.0 to fully work with Py3, now is a very good time to step up. How to give a hand: 1. Get my latest py3 branch from

Re: [Numpy-discussion] numpy 2.0, what else to do?

2010-02-13 Thread Charles R Harris
On Sat, Feb 13, 2010 at 2:07 PM, Xavier Gnata xavier.gn...@gmail.comwrote: On 02/13/2010 09:28 PM, Pauli Virtanen wrote: We will most likely have experimental py3 support in 2.0. If you, or someone else wishes to help bringing 2.0 to fully work with Py3, now is a very good time to step

Re: [Numpy-discussion] numpy 2.0, what else to do?

2010-02-13 Thread Xavier Gnata
On 02/13/2010 10:15 PM, Charles R Harris wrote: On Sat, Feb 13, 2010 at 2:07 PM, Xavier Gnata xavier.gn...@gmail.com mailto:xavier.gn...@gmail.com wrote: On 02/13/2010 09:28 PM, Pauli Virtanen wrote: We will most likely have experimental py3 support in 2.0. If you, or

[Numpy-discussion] A New Coercion Model

2010-02-13 Thread Friedrich Romstedt
Hi, there recently were some problems occuring when coercing numpy.ndarrays with something else. I would like to try to review the examples I've seen so far (it are two examples in only ~ one week), and also would try to summarise the approach taken up to now as far as I understand.

Re: [Numpy-discussion] numpy 2.0, what else to do?

2010-02-13 Thread Travis Oliphant
-- (mobile phone of) Travis Oliphant Enthought, Inc. 1-512-536-1057 http://www.enthought.com On Feb 13, 2010, at 2:34 PM, Jarrod Millman mill...@berkeley.edu wrote: On Sat, Feb 13, 2010 at 1:49 PM, Travis Oliphant oliph...@enthought.com wrote: This is exactly what I was worried about

Re: [Numpy-discussion] numpy 2.0, what else to do?

2010-02-13 Thread Travis Oliphant
Yes such changes could be done in the 2.x series with appropriate transition aids like deprecation warnings. Travis -- (mobile phone of) Travis Oliphant Enthought, Inc. 1-512-536-1057 http://www.enthought.com On Feb 13, 2010, at 2:01 PM, Charles R Harris charlesr.har...@gmail.com wrote:

Re: [Numpy-discussion] numpy 2.0, what else to do?

2010-02-13 Thread Travis Oliphant
I clarified my vote on these topics in a follow up email to Jared's separating the ideas. -- (mobile phone of) Travis Oliphant Enthought, Inc. 1-512-536-1057 http://www.enthought.com On Feb 13, 2010, at 1:44 PM, Travis Oliphant oliph...@enthought.com wrote: -1 -- (mobile phone of)

Re: [Numpy-discussion] numpy 2.0, what else to do?

2010-02-13 Thread Perry Greenfield
On Feb 13, 2010, at 11:24 AM, Charles R Harris wrote: Hi All, Since there has been talk of deprecating the numarray and numeric compatibility Can someone be explicit about what is mean by this deprecation? parts of numpy for the upcoming 2.0 release I thought maybe we could consider

Re: [Numpy-discussion] numpy 2.0, what else to do?

2010-02-13 Thread David Cournapeau
On Sun, Feb 14, 2010 at 1:24 AM, Charles R Harris charlesr.har...@gmail.com wrote: Hi All, Since there has been talk of deprecating the numarray and numeric compatibility parts of numpy for the upcoming 2.0 release I thought maybe we could consider a few other changes. First, numpy imports a

Re: [Numpy-discussion] Unpleasant behavior with poly1d and numpy scalar multiplication

2010-02-13 Thread Fernando Perez
On Sat, Feb 13, 2010 at 12:24 PM, Charles R Harris charlesr.har...@gmail.com wrote: One minor suggestion:  I think it would be useful to have the new polys have some form of pretty-printing like the old ones.  It is actually useful when working, to verify what one has at hand, to see an

[Numpy-discussion] Why does np.nan{min, max} clobber my array mask?

2010-02-13 Thread David Carmean
I'm just starting to work with masked arrays and I've found some behavior that definitely does not follow the Principle of Least Surprise: I've generated a 2-d array from a list of lists, where the elements are floats with a good number of NaNs. Inspections shows the expected numbers for

Re: [Numpy-discussion] docstring suggestions

2010-02-13 Thread Pierre GM
On Feb 12, 2010, at 11:01 PM, David Goldsmith wrote: On Fri, Feb 12, 2010 at 7:09 PM, Pierre GM pgmdevl...@gmail.com wrote: On Feb 12, 2010, at 8:14 PM, David Goldsmith wrote Is the present issue an instance where Scott's second statement is invalid, an instance where its validity is

Re: [Numpy-discussion] Unpleasant behavior with poly1d and numpy scalar multiplication

2010-02-13 Thread Charles R Harris
On Sat, Feb 13, 2010 at 8:02 PM, Fernando Perez fperez@gmail.comwrote: On Sat, Feb 13, 2010 at 12:24 PM, Charles R Harris charlesr.har...@gmail.com wrote: One minor suggestion: I think it would be useful to have the new polys have some form of pretty-printing like the old ones. It is

Re: [Numpy-discussion] Unpleasant behavior with poly1d and numpy scalar multiplication

2010-02-13 Thread Charles R Harris
On Sat, Feb 13, 2010 at 8:32 PM, Charles R Harris charlesr.har...@gmail.com wrote: On Sat, Feb 13, 2010 at 8:02 PM, Fernando Perez fperez@gmail.comwrote: On Sat, Feb 13, 2010 at 12:24 PM, Charles R Harris charlesr.har...@gmail.com wrote: One minor suggestion: I think it would be

Re: [Numpy-discussion] numpy 2.0, what else to do?

2010-02-13 Thread David Goldsmith
On Sat, Feb 13, 2010 at 11:59 AM, Matthew Brett matthew.br...@gmail.comwrote: Hi, On Sat, Feb 13, 2010 at 11:53 AM, Xavier Gnata xavier.gn...@gmail.com wrote: IMHO 2.0 should support python3. That would be a major step and a good reason to call it 2.0. I agree with Travis, I think we

Re: [Numpy-discussion] docstring suggestions

2010-02-13 Thread David Goldsmith
On Sat, Feb 13, 2010 at 7:31 PM, Pierre GM pgmdevl...@gmail.com wrote: On Feb 12, 2010, at 11:01 PM, David Goldsmith wrote: On Fri, Feb 12, 2010 at 7:09 PM, Pierre GM pgmdevl...@gmail.com wrote: On Feb 12, 2010, at 8:14 PM, David Goldsmith wrote Is the present issue an instance where

[Numpy-discussion] Buildbots in red meltdown.

2010-02-13 Thread Charles R Harris
*All* the buildbots are showing errors. Here are some: == ERROR: test_view_to_flexible_dtype (test_core.TestMaskedView) -- Traceback (most recent call last):

Re: [Numpy-discussion] docstring suggestions

2010-02-13 Thread David Goldsmith
On Sat, Feb 13, 2010 at 9:53 PM, Pierre GM pgmdevl...@gmail.com wrote: On Feb 13, 2010, at 11:56 PM, David Goldsmith wrote: Please don't misinterpret my statements to mean that I think this isn't important and/or that you should feel solely responsible for a fix - I sincerely just wanted

Re: [Numpy-discussion] Buildbots in red meltdown.

2010-02-13 Thread David Goldsmith
When it rains, it pours... :-( DG On Sat, Feb 13, 2010 at 10:26 PM, Charles R Harris charlesr.har...@gmail.com wrote: *All* the buildbots are showing errors. Here are some: == ERROR: test_view_to_flexible_dtype

Re: [Numpy-discussion] Buildbots in red meltdown.

2010-02-13 Thread Pierre GM
On Feb 14, 2010, at 1:26 AM, Charles R Harris wrote: *All* the buildbots are showing errors. Here are some: Only with Python 2.4, right ? That's the ticket #1367 I haven't had time to deal with (because I need a Python2.4 to test it). ___

Re: [Numpy-discussion] docstring suggestions

2010-02-13 Thread Pierre GM
On Feb 14, 2010, at 1:42 AM, David Goldsmith wrote: On Sat, Feb 13, 2010 at 9:53 PM, Pierre GM pgmdevl...@gmail.com wrote: On Feb 13, 2010, at 11:56 PM, David Goldsmith wrote: Please don't misinterpret my statements to mean that I think this isn't important and/or that you should feel

Re: [Numpy-discussion] docstring suggestions

2010-02-13 Thread Fernando Perez
On Sun, Feb 14, 2010 at 12:53 AM, Pierre GM pgmdevl...@gmail.com wrote: In IPython, numpy.ma.compress? gives you the doc, twice (I don't get why). I don't have a clue either, but it's now tracked at least: https://bugs.launchpad.net/ipython/+bug/521612 Thanks! f

Re: [Numpy-discussion] Buildbots in red meltdown.

2010-02-13 Thread Charles R Harris
On Sat, Feb 13, 2010 at 11:26 PM, Charles R Harris charlesr.har...@gmail.com wrote: *All* the buildbots are showing errors. Here are some: == ERROR: test_view_to_flexible_dtype (test_core.TestMaskedView)

Re: [Numpy-discussion] Buildbots in red meltdown.

2010-02-13 Thread Charles R Harris
On Sat, Feb 13, 2010 at 11:50 PM, Pierre GM pgmdevl...@gmail.com wrote: On Feb 14, 2010, at 1:26 AM, Charles R Harris wrote: *All* the buildbots are showing errors. Here are some: Only with Python 2.4, right ? That's the ticket #1367 I haven't had time to deal with (because I need a

Re: [Numpy-discussion] Unpleasant behavior with poly1d and numpy scalar multiplication

2010-02-13 Thread Fernando Perez
On Sat, Feb 13, 2010 at 10:32 PM, Charles R Harris charlesr.har...@gmail.com wrote: Note that ipython calls __repr__ to print the output. __repr__ is supposed to provide a string that can be used to recreate the object, a pretty printed version of __repr__ doesn't provide that. Also, an array

Re: [Numpy-discussion] Buildbots in red meltdown.

2010-02-13 Thread Charles R Harris
On Sat, Feb 13, 2010 at 11:26 PM, Charles R Harris charlesr.har...@gmail.com wrote: *All* the buildbots are showing errors. Here are some: == ERROR: test_view_to_flexible_dtype (test_core.TestMaskedView)

Re: [Numpy-discussion] numpy 2.0, what else to do?

2010-02-13 Thread Matthew Brett
Hi, Sounds to me like you don't fully agree w/ Travis - he said This is exactly what I was worried about with calling the next release 2.0.  Seems that Travis understands that the larger community, whether we want them to or not, _does_ attach...much importance to [a] big number change and

Re: [Numpy-discussion] Unpleasant behavior with poly1d and numpy scalar multiplication

2010-02-13 Thread Charles R Harris
On Sun, Feb 14, 2010 at 12:10 AM, Fernando Perez fperez@gmail.comwrote: On Sat, Feb 13, 2010 at 10:32 PM, Charles R Harris charlesr.har...@gmail.com wrote: Note that ipython calls __repr__ to print the output. __repr__ is supposed to provide a string that can be used to recreate the

Re: [Numpy-discussion] docstring suggestions

2010-02-13 Thread David Goldsmith
On Sat, Feb 13, 2010 at 10:52 PM, Pierre GM pgmdevl...@gmail.com wrote: On Feb 14, 2010, at 1:42 AM, David Goldsmith wrote: On Sat, Feb 13, 2010 at 9:53 PM, Pierre GM pgmdevl...@gmail.com wrote: On Feb 13, 2010, at 11:56 PM, David Goldsmith wrote: Please don't misinterpret my

Re: [Numpy-discussion] numpy 2.0, what else to do?

2010-02-13 Thread David Goldsmith
On Sat, Feb 13, 2010 at 11:13 PM, Matthew Brett matthew.br...@gmail.comwrote: Hi, Sounds to me like you don't fully agree w/ Travis - he said This is exactly what I was worried about with calling the next release 2.0. Seems that Travis understands that the larger community, whether we

Re: [Numpy-discussion] Buildbots in red meltdown.

2010-02-13 Thread Pierre GM
On Feb 14, 2010, at 2:03 AM, Charles R Harris wrote: On Sat, Feb 13, 2010 at 11:50 PM, Pierre GM pgmdevl...@gmail.com wrote: On Feb 14, 2010, at 1:26 AM, Charles R Harris wrote: *All* the buildbots are showing errors. Here are some: Only with Python 2.4, right ? That's the ticket

Re: [Numpy-discussion] Unpleasant behavior with poly1d and numpy scalar multiplication

2010-02-13 Thread David Goldsmith
On Sat, Feb 13, 2010 at 11:10 PM, Fernando Perez fperez@gmail.comwrote: On Sat, Feb 13, 2010 at 10:32 PM, Charles R Harris charlesr.har...@gmail.com wrote: Note that ipython calls __repr__ to print the output. __repr__ is supposed to provide a string that can be used to recreate the