I have a file reader that reads n bytes from a file and returns a string of chars representing that (binary) data. I want to read up n bytes into a numpy array
>>> '\x01\x05\x03\xff' '\x01\x05\x03\xff' >>> map(ord, '\x01\x05\x03\xff') [1, 5, 3, 255] >>> numpy.array(map(ord, '\x01\x05\x03\xff')) array([ 1, 5, 3, 255])