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 wrote: > > > 2011/12/27 Jordi Gutiérrez Hermoso >> >> On 26 December 2011 14:56, Ralf Gommers >> wrote: >> > >> > >> > On Mon, Dec 26, 2011 at 8:50 PM, wrote: >> >> I have a hard time thinking through empty 2-dim arrays, and don't know >> >> what rules sh

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 wrote: > On 12/28/2011

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 > > mailto:d.s.seljeb...@astro.uio.no>> wrote: > > > > On 12/28/2011 01:52 PM, Dag Sverre S

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 > 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: > >> > >> > >> 2011/12

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 Hermoso >> > > >> > >> On 26 De

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 Hermoso> > >> >> On 26 December 2011 14:56, Ralf Gommers> > wrote: >> > >> > >>

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 > > > On 26 December 2011 14:56, Ralf Gommers > wrote: > > > > > > On Mon, Dec 26, 2011 at 8:50 PM,

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

2011-12-28 Thread Ralf Gommers
2011/12/27 Jordi Gutiérrez Hermoso > On 26 December 2011 14:56, Ralf Gommers > wrote: > > > > > > On Mon, Dec 26, 2011 at 8:50 PM, 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 thes

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

2011-12-26 Thread Jordi Gutiérrez Hermoso
On 26 December 2011 19:56, 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 as sanely as Octave:

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

2011-12-26 Thread josef . pktd
2011/12/26 Jordi Gutiérrez Hermoso : > On 26 December 2011 14:56, Ralf Gommers wrote: >> >> >> On Mon, Dec 26, 2011 at 8:50 PM, 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

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 wrote: > > > On Mon, Dec 26, 2011 at 8:50 PM, 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 early >> than late and then having to

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

2011-12-26 Thread Ralf Gommers
On Mon, Dec 26, 2011 at 8:50 PM, wrote: > On Mon, Dec 26, 2011 at 1:51 PM, Ralf Gommers > wrote: > > > > > > 2011/12/25 Jordi Gutiérrez Hermoso > >> > >> I have been instructed to bring this issue to the mailing list: > >> > >> http://projects.scipy.org/numpy/ticket/1994 > >> > > The issue is

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 wrote: > > > 2011/12/25 Jordi Gutiérrez Hermoso >> >> 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[

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

2011-12-26 Thread Ralf Gommers
2011/12/25 Jordi Gutiérrez Hermoso > 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 array([],

[Numpy-discussion] Indexing empty dimensions with empty arrays

2011-12-24 Thread Jordi Gutiérrez Hermoso
I have been instructed to bring this issue to the mailing list: http://projects.scipy.org/numpy/ticket/1994 TIA, - Jordi G. H. ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion