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
You can do this directly with numpy.fromstring:
numpy.fromstring
import numpy as np s = '\x01\x05\x03\xff' a = np.fromstring(s, dtype='uint8')
Once completing this, a is array([ 1, 5, 3, 255]) and you can use the regular scipy/numpy FFT routines.
a
array([ 1, 5, 3, 255])