Skip to content

Commit

Permalink
Fix print dual Tensor
Browse files Browse the repository at this point in the history
  • Loading branch information
holl- committed Jan 5, 2025
1 parent f7eba20 commit fa6794d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion phiml/math/_tensors.py
Original file line number Diff line number Diff line change
Expand Up @@ -2779,7 +2779,7 @@ def format_full(value: Tensor, options: PrintOptions) -> str: # multi-line cont
dual_dim = dual(value).name
primal = dual(value).as_spatial().name
if primal not in value.shape:
primal = non_batch(value).non_dual.name
primal = non_batch(value).non_dual
for b in batch(value).meshgrid(names=True):
text = " " + np.array2string(value[b].numpy([primal, dual_dim]), separator=', ', max_line_width=np.inf) + " "
text = re.sub('[\\[\\]]', '', text).replace(',', ' ')
Expand Down

0 comments on commit fa6794d

Please sign in to comment.