Skip to content

Commit

Permalink
Fix TensorStack of sparse matrices
Browse files Browse the repository at this point in the history
  • Loading branch information
Philipp Holl committed Dec 16, 2024
1 parent 8a7b20b commit cd20034
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion phiml/math/_tensors.py
Original file line number Diff line number Diff line change
Expand Up @@ -1424,7 +1424,10 @@ def _is_tracer(self) -> bool:

@property
def requires_broadcast(self):
return self._varying_shapes or not self._shape.well_defined or self._is_tracer or self._tensors[0].shape.is_non_uniform
if self._varying_shapes or not self._shape.well_defined or self._is_tracer or self._tensors[0].shape.is_non_uniform:
return True
from ._sparse import is_sparse
return is_sparse(self)

@property
def stack_dim(self):
Expand Down

0 comments on commit cd20034

Please sign in to comment.