I'm trying to output some data from a python script to a binary file.
If I have a list of floats I've been using this
out_file = open("filename", "wb")
float_array.array("f", [])
float_array.fromlist(mylist)
float_array.tofile(out_file)
out_file.close()
This seems to work fine, at least it's resulting in a file with the correct number of bytes.
How can I do the same thing but using a list of complex numbers?
Thanks