def read_numpy ( fh , byteorder , dtype , count , offsetsize ) : dtype = 'b' if dtype [ - 1 ] == 's' else byteorder + dtype [ - 1 ] return fh . read_array ( dtype , count )
python numpy read binary array from file
Read tag data from file and return as numpy array .
def read_numpy(fh, byteorder, dtype, count, offsetsize):
    """Read tag data from file and return as numpy array."""
    dtype = 'b' if dtype[-1] == 's' else byteorder+dtype[-1]
    return fh.read_array(dtype, count)