# mlx.core.save — MLX 0.0.7 documentation

Skip to main content
`Ctrl`+`K`

# mlx.core.save

mlx.core.save(file: str, arr: array, /, retain_graph: Optional[ bool ] = None)

  Save the array to a binary file in `.npy` format.

  Parameters:

    - file (str) – File to which the array is saved

    - arr (array) – Array to be saved.

    - retain_graph (bool , optional) – Whether or not to retain the graph during array evaluation. If left unspecified the graph is retained only if saving is done in a function transformation. Default: `None`