small fixes

This commit is contained in:
dc-dc-dc 2023-12-22 01:25:42 -05:00
parent fdf9d99f0f
commit 13fd7bd721
2 changed files with 6 additions and 1 deletions

View File

@ -232,6 +232,8 @@ array mlx_load_npy_helper(py::object file, StreamOrDevice s) {
}
return {arr};
}
throw std::invalid_argument(
"[load_npy] Input must be a file-like object, string, or pathlib.Path");
}
DictOrArray mlx_load_helper(

View File

@ -22,7 +22,10 @@ void mlx_save_safetensor_helper(
py::dict d,
bool retain_graph = true);
DictOrArray mlx_load_helper(py::object file, StreamOrDevice s);
DictOrArray mlx_load_helper(
py::object file,
std::optional<std::string> format,
StreamOrDevice s);
void mlx_save_helper(
py::object file,
array a,