[Numpy-discussion] Indexing changes/deprecations

Sebastian Berg sebastian at sipsolutions.net
Fri Sep 27 09:35:10 EDT 2013


On Fri, 2013-09-27 at 09:26 -0400, Benjamin Root wrote:

<snip>

> 
> Boolean indexing could use a facelift.  First, consider the following
> (albeit minor) annoyance:
> 
Done. Well will be deprecation warnings for the time being, though.

<snip>
> 
> Next, it would be nice if boolean indexing returned a view (wishful
> thinking, I know):
> 
Yeah, that is impossible unless you create some intermediate non-array
object, so that is out of the scope of things for now I think.

> >>> c = a[b]
> >>> c
> array([0, 2, 4])
> >>> c[1] = 7
> >>> c
> array([0, 7, 4])
> >>> a
> array([0, 1, 2, 3, 4])
> 
> 
> Cheers!
> Ben Root
> 
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion at scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion





More information about the NumPy-Discussion mailing list