Skip to content

Commit

Permalink
Improved error message
Browse files Browse the repository at this point in the history
  • Loading branch information
Philipp Holl committed Aug 21, 2024
1 parent 5424100 commit 717fb0f
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 @@ -2232,7 +2232,7 @@ def reshaped_native(value: Tensor,
Returns:
Native tensor with dimensions matching `groups`.
"""
assert isinstance(value, Tensor), f"value must be a Tensor but got {type(value)}"
assert isinstance(value, Tensor), f"value must be a Tensor but got {value} {type(value)}"
assert not value._is_tracer, f"Failed accessing native values because tensor {value.shape} is a tracer"
assert value.shape.is_uniform, f"Only uniform (homogenous) tensors can be converted to native but got shape {value.shape}"
assert isinstance(groups, (tuple, list)), f"groups must be a tuple or list but got {type(value)}"
Expand Down

0 comments on commit 717fb0f

Please sign in to comment.