mlx.data.Buffer.load_numpy

mlx.data.Buffer.load_numpy#

Buffer.load_numpy(self: mlx.data._c.Buffer, key: str, prefix: str = '', from_memory: bool = False, output_key: str = '') mlx.data._c.Buffer#

Load an array from a .npy file.

Parameters:
  • key (str) – The sample key that contains the array we are operating on.

  • prefix (str) – The filepath prefix to use when loading the files. (default: ‘’)

  • from_memory (bool) – If true assume the file contents are in the array instead of the file name. (default: False)

  • output_key (str) – The key to store the result in. If it is an empty string then overwrite the input. (default: ‘’)