MCPcopy Create free account
hub / github.com/ml-explore/mlx / is_istream_object

Function is_istream_object

python/src/load.cpp:34–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32}
33
34bool is_istream_object(const nb::object& file) {
35 return nb::hasattr(file, "readinto") && nb::hasattr(file, "seek") &&
36 nb::hasattr(file, "tell") && nb::hasattr(file, "closed");
37}
38
39bool is_ostream_object(const nb::object& file) {
40 return nb::hasattr(file, "write") && nb::hasattr(file, "seek") &&

Callers 4

is_zip_fileFunction · 0.85
mlx_load_npy_helperFunction · 0.85
mlx_load_helperFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected