[Numpy-discussion] ENH: Adding a count parameter to np.unpackbits
Joseph Fox-Rabinovitz
jfoxrabinovitz at gmail.com
Sun Apr 8 02:49:41 EDT 2018
Hi,
I have added PR #10855 to allow unpackbits to unpack less than the entire
set of bits. This is not a very big change, and 100% backwards compatible.
It serves two purposes:
1. To make packbits and unpackbits completely invertible (and
prevent things like this from being necessary:
https://stackoverflow.com/a/44962805/2988730)
2. To prevent an unnecessary waste of space for large arrays that are
unpacked along a single dimension.
Regards,
- Joe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20180408/e06bc04a/attachment.html>
More information about the NumPy-Discussion
mailing list