Re: [Numpy-discussion] Indexing empty dimensions with empty arrays

2011-12-28 Thread Ralf Gommers
2011/12/27 Jordi Gutiérrez Hermoso jord...@octave.org On 26 December 2011 14:56, Ralf Gommers ralf.gomm...@googlemail.com wrote: On Mon, Dec 26, 2011 at 8:50 PM, josef.p...@gmail.com wrote: I have a hard time thinking through empty 2-dim arrays, and don't know what rules should apply.

Re: [Numpy-discussion] Indexing empty dimensions with empty arrays

2011-12-28 Thread Dag Sverre Seljebotn
On 12/28/2011 09:33 AM, Ralf Gommers wrote: 2011/12/27 Jordi Gutiérrez Hermoso jord...@octave.org mailto:jord...@octave.org On 26 December 2011 14:56, Ralf Gommers ralf.gomm...@googlemail.com mailto:ralf.gomm...@googlemail.com wrote: On Mon, Dec 26, 2011 at 8:50

Re: [Numpy-discussion] Indexing empty dimensions with empty arrays

2011-12-28 Thread Dag Sverre Seljebotn
On 12/28/2011 01:52 PM, Dag Sverre Seljebotn wrote: On 12/28/2011 09:33 AM, Ralf Gommers wrote: 2011/12/27 Jordi Gutiérrez Hermosojord...@octave.org mailto:jord...@octave.org On 26 December 2011 14:56, Ralf Gommersralf.gomm...@googlemail.com mailto:ralf.gomm...@googlemail.com

Re: [Numpy-discussion] Indexing empty dimensions with empty arrays

2011-12-28 Thread Ralf Gommers
On Wed, Dec 28, 2011 at 1:57 PM, Dag Sverre Seljebotn d.s.seljeb...@astro.uio.no wrote: On 12/28/2011 01:52 PM, Dag Sverre Seljebotn wrote: On 12/28/2011 09:33 AM, Ralf Gommers wrote: 2011/12/27 Jordi Gutiérrez Hermosojord...@octave.org mailto:jord...@octave.org On 26

Re: [Numpy-discussion] Indexing empty dimensions with empty arrays

2011-12-28 Thread Dag Sverre Seljebotn
On 12/28/2011 02:21 PM, Ralf Gommers wrote: On Wed, Dec 28, 2011 at 1:57 PM, Dag Sverre Seljebotn d.s.seljeb...@astro.uio.no mailto:d.s.seljeb...@astro.uio.no wrote: On 12/28/2011 01:52 PM, Dag Sverre Seljebotn wrote: On 12/28/2011 09:33 AM, Ralf Gommers wrote:

Re: [Numpy-discussion] Indexing empty dimensions with empty arrays

2011-12-28 Thread Ralf Gommers
On Wed, Dec 28, 2011 at 2:45 PM, Dag Sverre Seljebotn d.s.seljeb...@astro.uio.no wrote: On 12/28/2011 02:21 PM, Ralf Gommers wrote: On Wed, Dec 28, 2011 at 1:57 PM, Dag Sverre Seljebotn d.s.seljeb...@astro.uio.no mailto:d.s.seljeb...@astro.uio.no wrote: On 12/28/2011 01:52 PM,

Re: [Numpy-discussion] Indexing empty dimensions with empty arrays

2011-12-28 Thread Travis Oliphant
I agree with Dag, NumPy should provide consistent handling of empty arrays. It does require some work, but it should be at least declared a bug when it doesn't. Travis -- Travis Oliphant (on a mobile) 512-826-7480 On Dec 28, 2011, at 7:45 AM, Dag Sverre Seljebotn

Re: [Numpy-discussion] Indexing empty dimensions with empty arrays

2011-12-28 Thread Jordi Gutiérrez Hermoso
On 28 December 2011 03:33, Ralf Gommers ralf.gomm...@googlemail.com wrote: 2011/12/27 Jordi Gutiérrez Hermoso jord...@octave.org On 26 December 2011 14:56, Ralf Gommers ralf.gomm...@googlemail.com wrote: On Mon, Dec 26, 2011 at 8:50 PM, josef.p...@gmail.com wrote: I have a hard time

Re: [Numpy-discussion] Indexing empty dimensions with empty arrays

2011-12-26 Thread Ralf Gommers
2011/12/25 Jordi Gutiérrez Hermoso jord...@octave.org I have been instructed to bring this issue to the mailing list: http://projects.scipy.org/numpy/ticket/1994 The issue is this corner case: idx = [] x = np.array([]) x[idx] #works array([], dtype=float64) x[:, idx] #works

Re: [Numpy-discussion] Indexing empty dimensions with empty arrays

2011-12-26 Thread josef . pktd
On Mon, Dec 26, 2011 at 1:51 PM, Ralf Gommers ralf.gomm...@googlemail.com wrote: 2011/12/25 Jordi Gutiérrez Hermoso jord...@octave.org I have been instructed to bring this issue to the mailing list:   http://projects.scipy.org/numpy/ticket/1994 The issue is this corner case: idx = [] x

Re: [Numpy-discussion] Indexing empty dimensions with empty arrays

2011-12-26 Thread Ralf Gommers
On Mon, Dec 26, 2011 at 8:50 PM, josef.p...@gmail.com wrote: On Mon, Dec 26, 2011 at 1:51 PM, Ralf Gommers ralf.gomm...@googlemail.com wrote: 2011/12/25 Jordi Gutiérrez Hermoso jord...@octave.org I have been instructed to bring this issue to the mailing list:

Re: [Numpy-discussion] Indexing empty dimensions with empty arrays

2011-12-26 Thread Jordi Gutiérrez Hermoso
On 26 December 2011 14:56, Ralf Gommers ralf.gomm...@googlemail.com wrote: On Mon, Dec 26, 2011 at 8:50 PM, josef.p...@gmail.com wrote: I have a hard time thinking through empty 2-dim arrays, and don't know what rules should apply. However, in my code I might want to catch these cases rather

Re: [Numpy-discussion] Indexing empty dimensions with empty arrays

2011-12-26 Thread josef . pktd
2011/12/26 Jordi Gutiérrez Hermoso jord...@octave.org: On 26 December 2011 14:56, Ralf Gommers ralf.gomm...@googlemail.com wrote: On Mon, Dec 26, 2011 at 8:50 PM, josef.p...@gmail.com wrote: I have a hard time thinking through empty 2-dim arrays, and don't know what rules should apply.

Re: [Numpy-discussion] Indexing empty dimensions with empty arrays

2011-12-26 Thread Jordi Gutiérrez Hermoso
On 26 December 2011 19:56, josef.p...@gmail.com wrote: I don't think I ever ran into an empty matrix in matlab, and wouldn't know how it behaves. I think they behave like Octave matrices. I'm not sure about all cases because I don't have access to Matlab, but I think Matlab handles it about