mirror of
https://github.com/ml-explore/mlx.git
synced 2025-08-21 02:46:40 +08:00
idk why i removed this
This commit is contained in:
parent
172e696540
commit
227ef82784
@ -244,6 +244,8 @@ DictOrArray mlx_load_helper(
|
||||
std::string fname;
|
||||
if (py::isinstance<py::str>(file)) {
|
||||
fname = py::cast<std::string>(file);
|
||||
} else if (is_istream_object(file)) {
|
||||
fname = file.attr("name").cast<std::string>();
|
||||
} else {
|
||||
throw std::invalid_argument(
|
||||
"[load] Input must be a file-like object, or string");
|
||||
|
Loading…
Reference in New Issue
Block a user