[Numpy-discussion] Adding count parameter to unpackbits (PR-10855)

2019-02-21 Thread Sebastian Berg
Hi all,

I was about to merge it, but was noot sure it was really discussed
before (and it would be a long time ago). The pull requests:

https://github.com/numpy/numpy/pull/10855

Proposes to add a count parameter to unpackbits:

``count`` allows subsetting the number of bits that will be unpacked up-front,
rather than reshaping and subsetting later, making the ``packbits`` operation
invertible, and the unpacking less wasteful. Counts larger than the number of
available bits add zero padding. Negative counts trim bits off the end instead
of counting from the beginning. None counts implement the existing behavior of
unpacking everything.

This seems like a pretty small API addition, but I thought I would ping
the list again before merging in case anyone objects to it or feels it
should be modified.

In other words, the count parameter is much the same as indexing the
result:

np.unpackbits(x)[:count]

although it will zero pad if count is out of bounds. Which is necessary
if it is to invert a `np.packbits` when less than 8 bits are packed.

If no one speaks up, I plan to merge it soon.

Best,

Sebastian


signature.asc
Description: This is a digitally signed message part
___
NumPy-Discussion mailing list
NumPy-Discussion@python.org
https://mail.python.org/mailman/listinfo/numpy-discussion


Re: [Numpy-discussion] Stepping down as NumFOCUS liason

2019-02-21 Thread Ralf Gommers
On Tue, Feb 19, 2019 at 4:33 PM Charles R Harris 
wrote:

> Hi Nathaniel,
>
> On Mon, Feb 18, 2019 at 11:19 AM Nathaniel Smith  wrote:
>
>> Hi all,
>>
>> As part of our relationship with NumFOCUS, we have to have some liasons
>> so they know who to contact etc. So far that's been Ralf and me. But, I
>> haven't had as much time for numpy recently, and I think it would be better
>> to hand this off to someone who's more active. Is anyone interested?
>> Someone on the steering council would probably be most natural.
>>
>
> Thanks for the ping. I hope you are doing well, we miss your input.
>

+1 to that. And thanks for being one of the NumFOCUS contacts until now
Nathaniel.

Any other takers? It's very little work. We get a monthly email from Gina
asking for input on the NumFOCUS projects newsletter (new releases,
sprints, etc.), and an occasional request that needs answering or
forwarding to the steering committee. So far I think we've only sent one
serious request to NumFOCUS - a check on a license thing with MKL I
believe. Finally you can just the NumFOCUS projects mailing lists and Slack
channel, which is quite informative and interesting (sharing by other
projects of relevant things mainly).

Cheers,
Ralf
___
NumPy-Discussion mailing list
NumPy-Discussion@python.org
https://mail.python.org/mailman/listinfo/numpy-discussion