[PLUG] Manipulating Bit Masks in Python
Rich Shepard
rshepard at appl-ecosys.com
Wed Dec 28 00:00:17 UTC 2005
Has anyone here manipulated bit-masked data in Python? I'm having
difficulties finding information on how to go about it.
The Numerical Python (Nympy) doc has a chapter on masked arrays, but these
are not the same thing; they're a mask that indicates which rows/columns have
valid data in an array.
I'll be getting 2-bytes/row data from the optical mark reader and I need to
test each bit in each byte to know what data are in each row. If you know of
a reference that describes the preferred way to do this, please pass it on to
me.
Rich
--
Richard B. Shepard, Ph.D. | Author of "Quantifying Environmental
Applied Ecosystem Services, Inc. (TM) | Impact Assessments Using Fuzzy Logic"
<http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863
More information about the PLUG
mailing list