Re: [Numpy-discussion] ANN: SciPy 1.7.1

2021-08-02 Thread Charles R Harris
On Sun, Aug 1, 2021 at 8:31 PM Tyler Reddy wrote: > Hi all, > > On behalf of the SciPy development team I'm pleased to announce > the release of SciPy 1.7.1, which is a bug fix release. > > Sources and binary wheels can be found at: > https://pypi.org/project/scipy/ > and at: https://github.com/s

[Numpy-discussion] Revert the return of a single NaN for `np.unique` with floating point numbers?

2021-08-02 Thread Sebastian Berg
Hi all, In NumPy 1.21, the output of `np.unique` changed in the presence of multiple NaNs. Previously, all NaNs were returned when we now only return one (all NaNs were considered unique): a = np.array([1, 1, np.nan, np.nan, np.nan]) Before 1.21: >>> np.unique(a) array([ 1., nan, n

[Numpy-discussion] Plan for a new Indexing how-to document

2021-08-02 Thread Mukulika Pahari
Hi, all! I'm planning to write a how-to doc for ndarray indexing as per discussion in https://github.com/numpy/numpy/pull/19407. I have opened a discussion issue (https://github.com/numpy/numpy/issues/19586) with a few ideas and would love to know your opinions on them and other use-cases you'd lik

Re: [Numpy-discussion] Revert the return of a single NaN for `np.unique` with floating point numbers?

2021-08-02 Thread Ralf Gommers
On Mon, Aug 2, 2021 at 7:04 PM Sebastian Berg wrote: > Hi all, > > In NumPy 1.21, the output of `np.unique` changed in the presence of > multiple NaNs. Previously, all NaNs were returned when we now only > return one (all NaNs were considered unique): > > a = np.array([1, 1, np.nan, np.nan,

Re: [Numpy-discussion] Proposal for adding bit_count

2021-08-02 Thread Sebastian Berg
On Thu, 2021-07-29 at 21:46 +0530, Ganesh Kathiresan wrote: > Hi All, > > > > I am working on a new > UFunc, ` > bit_count ` (popcount > in > other languages) that aims to count the number of 1-bits in > th

Re: [Numpy-discussion] Proposal for adding bit_count

2021-08-02 Thread Stefan van der Walt
On Mon, Aug 2, 2021, at 10:50, Sebastian Berg wrote: > * Should `np.ndarray.bit_count()` exist? I tend against this; > but we should have it on (integer) scalars to mirror the > Python `int`. Should `np.bit_count` exist? Having it on the int* types may be sufficient. > * The return value is