idk why i removed this

This commit is contained in:
dc-dc-dc 2023-12-22 20:20:18 -05:00
parent 172e696540
commit 227ef82784

View File

@ -244,6 +244,8 @@ DictOrArray mlx_load_helper(
std::string fname; std::string fname;
if (py::isinstance<py::str>(file)) { if (py::isinstance<py::str>(file)) {
fname = py::cast<std::string>(file); fname = py::cast<std::string>(file);
} else if (is_istream_object(file)) {
fname = file.attr("name").cast<std::string>();
} else { } else {
throw std::invalid_argument( throw std::invalid_argument(
"[load] Input must be a file-like object, or string"); "[load] Input must be a file-like object, or string");