Re: [Numpy-discussion] Proposal for adding bit_count

2021-08-04 Thread Ganesh Kathiresan
> > Should `np.ndarray.bit_count()` exist? I tend against this; Thanks for the info Sebastian, I agree with this as we can stick to what Python offers. Should `np.bit_count` exist? Having it on the int* types may be sufficient. Hey Stephan, regarding this, I felt we could support it in the s

Re: [Numpy-discussion] Proposal for adding bit_count

2021-08-03 Thread Sebastian Berg
On Mon, 2021-08-02 at 13:10 -0700, Stefan van der Walt wrote: > 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

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

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