def write_array(self, data):
        """Write numpy array to binary file."""
        try:
            data.tofile(self._fh)
        except Exception:
            # BytesIO
            self._fh.write(data.tostring())
def write_array ( self , data ) : try : data . tofile ( self . _fh ) except Exception : self . _fh . write ( data . tostring ( ) )
Write numpy array to binary file.