Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions python/src/ops.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4021,7 +4021,7 @@ void init_ops(nb::module_& m) {
nb::kw_only(),
"stream"_a = nb::none(),
nb::sig(
"def load(file: Union[file, str, pathlib.Path], /, format: Optional[str] = None, return_metadata: bool = False, *, stream: Union[None, Stream, Device] = None) -> Union[array, dict[str, array]]"),
"def load(file: Union[file, str, pathlib.Path], /, format: Optional[str] = None, return_metadata: bool = False, *, stream: Union[None, Stream, Device] = None) -> Union[array, dict[str, array], Tuple[dict[str, array], dict[str, Any]]]"),
R"pbdoc(
Load array(s) from a binary file.

Expand All @@ -4037,11 +4037,12 @@ void init_ops(nb::module_& m) {
which support matadata. The metadata will be returned as an
additional dictionary. Default: ``False``.
Returns:
array or dict:
array, dict, or tuple:
A single array if loading from a ``.npy`` file or a dict
mapping names to arrays if loading from a ``.npz`` or
``.safetensors`` file. If ``return_metadata`` is ``True`` an
additional dictionary of metadata will be returned.
``.safetensors`` file. If ``return_metadata`` is ``True`` a
tuple ``(arrays, metadata)`` will be returned where the second
element is a dictionary containing the metadata.

Warning:

Expand Down
Loading