Skip to content

Commit

Permalink
Fix TensorStack.native(str)
Browse files Browse the repository at this point in the history
  • Loading branch information
holl- committed Jan 27, 2025
1 parent 0976cc8 commit 40d3a2b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions phiml/math/_tensors.py
Original file line number Diff line number Diff line change
Expand Up @@ -2459,6 +2459,8 @@ def process_group(g): # returns Shape or Ellipsis
for name in g:
assert name in shape, f"When specifying a group by dim names, all dims must be present but {name} is not part of {shape}"
return shape.only(g, reorder=True)
if isinstance(groups, str):
groups = groups.split(',')
groups = [process_group(g) for g in groups]
if Ellipsis in groups:
ellipsis_dims = shape.without([g for g in groups if g is not Ellipsis])
Expand Down

0 comments on commit 40d3a2b

Please sign in to comment.