Skip to content

Commit

Permalink
[vis] Avoid unnecessary stacking
Browse files Browse the repository at this point in the history
  • Loading branch information
holl- committed Oct 20, 2024
1 parent 03f090a commit 0a277f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion phi/vis/_vis.py
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ def _space(*values: Field or Tensor, ignore_dims: Shape, log_dims: Tuple[str], e
if '_' in all_dims and len(all_dims) > 2:
all_dims.remove('_')
all_bounds = [embed(get_default_limits(f, all_dims, log_dims, e).without(ignore_dims.names).largest(shape), all_dims) for f, e in zip(values, errs)]
bounds: Box = math.stack(all_bounds, batch('_fields'))
bounds: Box = math.stack(all_bounds, batch('_fields'), simplify=True)
lower = math.finite_min(bounds.lower, bounds.shape.without('vector'), default=-math.INF)
upper = math.finite_max(bounds.upper, bounds.shape.without('vector'), default=math.INF)
return Box(lower, upper)
Expand Down

0 comments on commit 0a277f6

Please sign in to comment.