Skip to content

Commit

Permalink
use np.linalg.norm
Browse files Browse the repository at this point in the history
  • Loading branch information
chrishavlin authored Dec 12, 2024
1 parent f014741 commit cb7035b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion yt/visualization/plot_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -2467,7 +2467,7 @@ def __init__(
if depth is None:
# off-axis projection, depth not specified
# -> set 'large enough' depth using half the box diagonal + margin
depth = np.sqrt(np.sum(ds.domain_width.in_units("code_length") ** 2)) * 1.02
depth = np.linalg.norm(ds.domain_width.in_units("code_length")) * 1.02
depth = ds.coordinates.sanitize_depth(depth)[0]

# center_rot normalizes the center to (0,0),
Expand Down

0 comments on commit cb7035b

Please sign in to comment.