BUG Raise exception for invalid input

Arrays of non-uint8 types were assumed to be in 0..1 range, resulting in
the small bits being showing when this was not true. Now, an explicit
exception is raised.

Closes issue #2499