Re: [Numpy-discussion] how to set a fixed sized dtype suitable for bitwise operations

2015-04-28 Thread Jaime Fernández del Río
On Tue, Apr 28, 2015 at 7:00 AM, Benjamin Root ben.r...@ou.edu wrote: I have a need to have a numpy array of 17 byte (more specifically, at least 147 bits) values that I would be doing some bit twiddling on. I have found that doing a dtype of i17 yields a dtype of int32, which is completely

[Numpy-discussion] how to set a fixed sized dtype suitable for bitwise operations

2015-04-28 Thread Benjamin Root
I have a need to have a numpy array of 17 byte (more specifically, at least 147 bits) values that I would be doing some bit twiddling on. I have found that doing a dtype of i17 yields a dtype of int32, which is completely not what I intended. Doing 'u17' gets an data type not understood. I have

Re: [Numpy-discussion] how to set a fixed sized dtype suitable for bitwise operations

2015-04-28 Thread Benjamin Root
Yeah, I am not seeing any way around it at the moment. I guess I will have to use the bitarray package for now. I was hoping for some fast per-element processing, but at the moment, I guess I will have to sacrifice that just to have something that worked correctly. Ben Root On Tue, Apr 28, 2015