Restores an array saved with mlx_save() and optionally places it on a
specified device.
Usage
mlx_load(file, device = mlx_default_device())Arguments
- file
Path to a
.npyfile. The extension is appended automatically when missing.- device
Execution target: supply
"gpu","cpu", or anmlx_streamcreated viamlx_new_stream(). Defaults to the currentmlx_default_device()unless noted otherwise (helpers that act on an existing array typically reuse that array's device or stream).
Details
Use an mlx_stream from mlx_new_stream() to load directly onto a
specific stream; otherwise the array is placed on the current
mlx_default_device().