Re: [Numpy-discussion] Add count (and dtype) to packbits

2021-07-21 Thread Neal Becker
Well that's just the point, I wanted to consider group size > 8. On Wed, Jul 21, 2021 at 8:53 AM Andras Deak wrote: > > On Wed, Jul 21, 2021 at 2:40 PM Neal Becker wrote: >> >> In my application I need to pack bits of a specified group size into >> integral values. >> Currently np.packbits only

Re: [Numpy-discussion] Add count (and dtype) to packbits

2021-07-21 Thread Andras Deak
On Wed, Jul 21, 2021 at 2:40 PM Neal Becker wrote: > In my application I need to pack bits of a specified group size into > integral values. > Currently np.packbits only packs into full bytes. > For example, I might have a string of bits encoded as a np.uint8 > vector with each uint8 item

[Numpy-discussion] Add count (and dtype) to packbits

2021-07-21 Thread Neal Becker
In my application I need to pack bits of a specified group size into integral values. Currently np.packbits only packs into full bytes. For example, I might have a string of bits encoded as a np.uint8 vector with each uint8 item specifying a single bit 1/0. I want to encode them 4 bits at a time