Re: [Numpy-discussion] DEP: Deprecate boolean array indices with non-matching shape #4353

2015-06-05 Thread Sebastian Berg
On Do, 2015-06-04 at 18:04 -0700, Nathaniel Smith wrote: On Thu, Jun 4, 2015 at 5:57 PM, Nathaniel Smith n...@pobox.com wrote: So specifically the question is -- if you have an array with five items, and a Boolean array with three items, then currently you can use the later to index the

Re: [Numpy-discussion] DEP: Deprecate boolean array indices with non-matching shape #4353

2015-06-05 Thread josef.pktd
On Fri, Jun 5, 2015 at 3:16 AM, Sebastian Berg sebast...@sipsolutions.net wrote: On Do, 2015-06-04 at 18:04 -0700, Nathaniel Smith wrote: On Thu, Jun 4, 2015 at 5:57 PM, Nathaniel Smith n...@pobox.com wrote: So specifically the question is -- if you have an array with five items, and a

Re: [Numpy-discussion] DEP: Deprecate boolean array indices with non-matching shape #4353

2015-06-05 Thread josef.pktd
On Fri, Jun 5, 2015 at 11:50 AM, Anne Archibald archib...@astron.nl wrote: On Fri, Jun 5, 2015 at 5:45 PM Sebastian Berg sebast...@sipsolutions.net wrote: On Fr, 2015-06-05 at 08:36 -0400, josef.p...@gmail.com wrote: snip What is actually being deprecated? It looks like there are

Re: [Numpy-discussion] DEP: Deprecate boolean array indices with non-matching shape #4353

2015-06-05 Thread Anne Archibald
On Fri, Jun 5, 2015 at 5:45 PM Sebastian Berg sebast...@sipsolutions.net wrote: On Fr, 2015-06-05 at 08:36 -0400, josef.p...@gmail.com wrote: snip What is actually being deprecated? It looks like there are different examples. wrong length: Nathaniels first example above, where the

Re: [Numpy-discussion] DEP: Deprecate boolean array indices with non-matching shape #4353

2015-06-05 Thread Sebastian Berg
On Fr, 2015-06-05 at 08:36 -0400, josef.p...@gmail.com wrote: snip What is actually being deprecated? It looks like there are different examples. wrong length: Nathaniels first example above, where the mask is not broadcastable to original array because mask is longer or shorter than

Re: [Numpy-discussion] DEP: Deprecate boolean array indices with non-matching shape #4353

2015-06-05 Thread Benjamin Root
On Thu, Jun 4, 2015 at 10:41 PM, Nathaniel Smith n...@pobox.com wrote: My comment was about the second type. Are your comments about the second type? The second type definitely does not produce a flattened array: I was talking about the second type in that I never even knew it existed. My

Re: [Numpy-discussion] DEP: Deprecate boolean array indices with non-matching shape #4353

2015-06-04 Thread Benjamin Root
On Thu, Jun 4, 2015 at 9:04 PM, Nathaniel Smith n...@pobox.com wrote: On Thu, Jun 4, 2015 at 5:57 PM, Nathaniel Smith n...@pobox.com wrote: One place where the current behavior is particularly baffling and annoying is when you have multiple boolean masks in the same indexing operation. I

Re: [Numpy-discussion] DEP: Deprecate boolean array indices with non-matching shape #4353

2015-06-04 Thread Nathaniel Smith
On Thu, Jun 4, 2015 at 5:57 PM, Nathaniel Smith n...@pobox.com wrote: So specifically the question is -- if you have an array with five items, and a Boolean array with three items, then currently you can use the later to index the former: arr = np.arange(5) mask = np.asarray([True, False,

Re: [Numpy-discussion] DEP: Deprecate boolean array indices with non-matching shape #4353

2015-06-04 Thread Nathaniel Smith
On Thu, Jun 4, 2015 at 6:22 PM, Benjamin Root ben.r...@ou.edu wrote: On Thu, Jun 4, 2015 at 9:04 PM, Nathaniel Smith n...@pobox.com wrote: On Thu, Jun 4, 2015 at 5:57 PM, Nathaniel Smith n...@pobox.com wrote: One place where the current behavior is particularly baffling and annoying is

Re: [Numpy-discussion] DEP: Deprecate boolean array indices with non-matching shape #4353

2015-06-04 Thread Charles R Harris
On Thu, Jun 4, 2015 at 6:26 PM, Charles R Harris charlesr.har...@gmail.com wrote: Hi All, I've not strong feelings one way or the other on this proposed deprecation for numpy 1.10 and would like some feedback from interested users. Umm, link is #4353