get_np_io

get_np_io(arr, **kwargs)[source]

Get the numpy object as bytes.

Parameters:
  • arr – Array-like

  • kwargs – Additional kwargs to pass to numpy.save().

Return type:

BytesIO

Returns:

A bytes object that can be used as a file.