Ahh, I figured it out.  The key is to set up the shapes so they
broadcast like an outerproduct, but using bitwise_and as the operation
and the second operand as the bit filter.  So we temporarily expand
each bit to a byte for numarray to be able to use it for dot products.
If you use a temporary Boolean variable to store the bitwise_and ufunc
output, the answer is automatically converted to boolean.

Set up the shapes for an innerproduct-like operation to go from byte
format back to bit compact Uint8 format.  Go numarray!

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to