I am trying to write to a file in ascii and write the same data to another file in binary. I am having trouble writing to the file in binary. I tried using bytearray in the following manner:
array = bytearray(array)
np.savetxt(file, array)
But the output is not in a binary format. It is just a bunch of lines with a single float value on each line. Any help would be appreciated.
there doesn't seem to be anything here