Skip to content

Commit

Permalink
fix for torch backend
Browse files Browse the repository at this point in the history
  • Loading branch information
bwpriest committed May 3, 2024
1 parent 1375167 commit d717e79
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion MuyGPyS/gp/deformation/isotropy.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def __call__(
if length_scale is None:
length_scale = self.length_scale(**kwargs)
# This is brittle and I hate it. I'm not sure where to put this logic.
if isinstance(length_scale, mm.ndarray):
if isinstance(length_scale, mm.ndarray) and len(length_scale.shape) > 0:
shape = [None] * dists.ndim
shape[0] = slice(None)
length_scale = length_scale[tuple(shape)]
Expand Down

0 comments on commit d717e79

Please sign in to comment.