I'm trying to convert a class 'numpy.int64'named "int_array" into bytes. In the past I used this structure
(-1024).to_bytes(8, byteorder='big', signed=True)
and worked fine. Now, saving all the integers into a matrix, it doesn't allow me to do this:
int_array[1][i].to_bytes(8, byteorder='big', signed=True)
If there is a function for integer32 it would also work.
Does anybody know an equivalent command? I will appreciate any help.