Re: [Numpy-discussion] [SciPy-Dev] Ubuntu PPA for NumPy / SciPy / ...

2012-06-08 Thread David Cournapeau
On Thu, Jun 7, 2012 at 5:24 PM, Andreas Hilboll li...@hilboll.de wrote: Hi, I just noticed that there's a PPA for NumPy/SciPy on Launchpad: https://launchpad.net/~scipy/+archive/ppa However, it's painfully outdated. Does anyone know of its status? Is it 'official'? Are there any plans

[Numpy-discussion] Numpy structures

2012-06-08 Thread Bob Cowdery
Hi all, I am reading a datagram which contains within it a type. The type dictates the structure of the datagram. I want to put this into a numpy structure, one of which is: np.zeros(1,dtype=('2uint8,uint8,uint8,uint32,8uint8,504uint8,8uint8,504uint8')) As I don't know what I'm getting until

Re: [Numpy-discussion] possible enhancement to getitem?

2012-06-08 Thread Neal Becker
Robert Kern wrote: On Thu, Jun 7, 2012 at 7:55 PM, Neal Becker ndbeck...@gmail.com wrote: In [3]: u = np.arange(10) In [4]: u Out[4]: array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]) In [5]: u[-2:] Out[5]: array([8, 9]) In [6]: u[-2:2] Out[6]: array([], dtype=int64) I would argue for

Re: [Numpy-discussion] possible enhancement to getitem?

2012-06-08 Thread Alan G Isaac
On 6/8/2012 9:14 AM, Neal Becker wrote: The fact that this proposed numpy behavior would not match python list behavior holds little weight for me. It is not just Python behavior for lists. It is the semantics for all sequence types. Breaking this would be appalling. Alan Isaac

Re: [Numpy-discussion] possible enhancement to getitem?

2012-06-08 Thread Jonathan T. Niehof
On 06/07/2012 12:55 PM, Neal Becker wrote: In [3]: u = np.arange(10) In [4]: u Out[4]: array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]) In [5]: u[-2:] Out[5]: array([8, 9]) In [6]: u[-2:2] Out[6]: array([], dtype=int64) I would argue for consistency it would be desirable for this to return [8,

Re: [Numpy-discussion] possible enhancement to getitem?

2012-06-08 Thread Bob Dowling
On 08/06/12 14:14, Neal Becker wrote: The fact that this proposed numpy behavior would not match python list behavior holds little weight for me. I would still favor this change, unless it added significant overhead. My opinion, of course. It holds enormous weight for me. My opinion is

Re: [Numpy-discussion] possible enhancement to getitem?

2012-06-08 Thread Mike Ressler
On 08/06/12 14:14, Neal Becker wrote: The fact that this proposed numpy behavior would not match python list behavior holds little weight for me.  I would still favor this change, unless it added significant overhead.  My opinion, of course. As a Joe User, I think using the [-2:2] syntax

Re: [Numpy-discussion] Numpy structures

2012-06-08 Thread Nathaniel Smith
On Fri, Jun 8, 2012 at 11:31 AM, Bob Cowdery b...@bobcowdery.plus.com wrote: Hi all, I am reading a datagram which contains within it a type. The type dictates the structure of the datagram. I want to put this into a numpy structure, one of which is:

[Numpy-discussion] not expected output of fill_diagonal

2012-06-08 Thread Frédéric Bastien
Hi, While reviewing the Theano op that wrap numpy.fill_diagonal, we found an unexpected behavior of it: # as expected for square matrix a=numpy.zeros((5,5)) numpy.fill_diagonal(a, 10) print a # as expected long rectangular matrix a=numpy.zeros((3,5)) numpy.fill_diagonal(a, 10) print a [[