[Numpy-discussion] Parlez-vous français?

2020-07-06 Thread Inessa Pawson
As most of you know, the inaugural NumPy community survey is currently underway. Fabrice Silva kindly offered his help to translate the survey questionnaire into French to maximize the participation of NumPy users and developers from the Fren

[Numpy-discussion] What is up with raw boolean indices (like a[False])?

2020-07-06 Thread Aaron Meurer
I've been trying to figure out this behavior. It doesn't seem to be documented at https://numpy.org/doc/stable/reference/arrays.indexing.html >>> a = np.empty((2, 3)) >>> a.shape (2, 5) >>> a[True].shape (1, 2, 5) >>> a[False].shape (0, 2, 5) It seems like indexing with a raw boolean (True or Fal

Re: [Numpy-discussion] What is up with raw boolean indices (like a[False])?

2020-07-06 Thread Sebastian Berg
On Mon, 2020-07-06 at 12:39 -0600, Aaron Meurer wrote: > I've been trying to figure out this behavior. It doesn't seem to be > documented at > https://numpy.org/doc/stable/reference/arrays.indexing.html > > > > > a = np.empty((2, 3)) > > > > a.shape > (2, 5) > > > > a[True].shape > (1, 2, 5) > >

Re: [Numpy-discussion] What is up with raw boolean indices (like a[False])?

2020-07-06 Thread Aaron Meurer
> Its fully intentional as it is the correct generalization from an N-D > boolean index to include a 0-D boolean index. > To be fair, there is a footnote in the "Detailed notes" saying that: > "the nonzero equivalence for Boolean arrays does not hold for zero > dimensional boolean arrays.", this is