Expanding the scope of numpy.unpackbits and numpy.packbits to include more than uint8 type

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Expanding the scope of numpy.unpackbits and numpy.packbits to include more than uint8 type

Rashiq Azhan
I would like this feature to be added since I think it can very useful
when there is a need to process data that cannot be included in uint8.
One of my personal requirements is modifying a 10-bit, per channel,
images held in a NumPy array but I cannot do that using the specified
functions. They are eloquent solution and works well with the with
NumPy functions as long as the data is uint8.
_______________________________________________
NumPy-Discussion mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/numpy-discussion
Reply | Threaded
Open this post in threaded view
|

Re: Expanding the scope of numpy.unpackbits and numpy.packbits to include more than uint8 type

Joseph Fox-Rabinovitz
You can view any array as uint8


On Mon, Mar 29, 2021, 14:27 Rashiq Azhan <[hidden email]> wrote:
I would like this feature to be added since I think it can very useful
when there is a need to process data that cannot be included in uint8.
One of my personal requirements is modifying a 10-bit, per channel,
images held in a NumPy array but I cannot do that using the specified
functions. They are eloquent solution and works well with the with
NumPy functions as long as the data is uint8.
_______________________________________________
NumPy-Discussion mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/numpy-discussion

_______________________________________________
NumPy-Discussion mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/numpy-discussion
Reply | Threaded
Open this post in threaded view
|

Re: Expanding the scope of numpy.unpackbits and numpy.packbits to include more than uint8 type

klark--kent
I thought about it as well. Can't NumPy create a custom type which user can set for his needs. It will be usefull because of lack memory. For example I work with data from zero to 1e-6 or to 1e-8 with double prcision and not more. So I could save usefull memory.

29.03.2021, 22:11, "Joseph Fox-Rabinovitz" <[hidden email]>:
You can view any array as uint8


On Mon, Mar 29, 2021, 14:27 Rashiq Azhan <[hidden email]> wrote:
I would like this feature to be added since I think it can very useful
when there is a need to process data that cannot be included in uint8.
One of my personal requirements is modifying a 10-bit, per channel,
images held in a NumPy array but I cannot do t using the specified
functions. They are eloquent solution and works well with the with
NumPy functions as long as the data is uint8.
_______________________________________________
NumPy-Discussion mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/numpy-discussion
,

_______________________________________________
NumPy-Discussion mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/numpy-discussion


_______________________________________________
NumPy-Discussion mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/numpy-discussion