Skip to content

Commit 634ae95

Browse files
ev-brlezcano
andauthored
Update torch_np/_funcs.py
Co-authored-by: Mario Lezcano Casado <[email protected]>
1 parent 13ba799 commit 634ae95

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

torch_np/_funcs.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@
77
# and consume/return PyTorch tensors/dtypes.
88
# They are also type annotated.
99
# Pull these functions from _funcs_impl and decorate them with @normalizer, which
10-
# converts inputs/outputs to/from tensors/torch dtypes to tnp.dtypes and so on.
10+
# - Converts any input `np.ndarray`, `torch_np.ndarray`, list of lists, Python scalars, etc into a `torch.Tensor`.
11+
# - Maps NumPy dtypes to PyTorch dtypes
12+
# - If the input to the `axis` kwarg is an ndarray, it maps it into a tuple
13+
# - Implements the semantics for the `out=` arg
14+
# - Wraps back the outputs into `torch_np.ndarrays`
1115

1216
__all__ = [
1317
x

0 commit comments

Comments
 (0)