diff --git a/python/src/load.cpp b/python/src/load.cpp index d3c603008..0730d33d6 100644 --- a/python/src/load.cpp +++ b/python/src/load.cpp @@ -26,7 +26,7 @@ using namespace mlx::core; /////////////////////////////////////////////////////////////////////////////// bool is_istream_object(const py::object& file) { - return py::hasattr(file, "read") && py::hasattr(file, "seek") && + return py::hasattr(file, "readinto") && py::hasattr(file, "seek") && py::hasattr(file, "tell") && py::hasattr(file, "closed"); }