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

Method open

python/src/load.cpp:76–83  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74 }
75
76 nb::object open(const std::string& key, char mode = 'r') {
77 // Following numpy :
78 // https://github.com/numpy/numpy/blob/db4f43983cb938f12c311e1f5b7165e270c393b4/numpy/lib/npyio.py#L742C36-L742C47
79 if (mode == 'w') {
80 return open_func_(key, "mode"_a = mode, "force_zip64"_a = true);
81 }
82 return open_func_(key, "mode"_a = mode);
83 }
84
85 private:
86 nb::module_ zipfile_module_;

Callers 2

mlx_load_npz_helperFunction · 0.80
mlx_savez_helperFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected