Skip to content

Commit

Permalink
Add default_list_dim to wrap()
Browse files Browse the repository at this point in the history
  • Loading branch information
holl- committed Feb 1, 2024
1 parent e580b87 commit b0f4a7c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions phiml/math/_tensors.py
Original file line number Diff line number Diff line change
Expand Up @@ -1669,10 +1669,9 @@ def tensor(data,
raise ValueError(f"{type(data)} is not supported. Only (Tensor, tuple, list, np.ndarray, native tensors) are allowed.\nCurrent backends: {BACKENDS}")


def wrap(data,
*shape: Shape) -> Tensor:
def wrap(data, *shape: Shape, default_list_dim=channel('vector')) -> Tensor:
""" Short for `phiml.math.tensor()` with `convert=False`. """
return tensor(data, *shape, convert=False) # TODO inline, simplify
return tensor(data, *shape, convert=False, default_list_dim=default_list_dim)


def layout(objects, *shape: Shape) -> Tensor:
Expand Down

0 comments on commit b0f4a7c

Please sign in to comment.