From 3898a163fddc155e9c1308b0ce1e651cc23c74d2 Mon Sep 17 00:00:00 2001 From: Chris Havlin Date: Thu, 12 Dec 2024 17:12:04 -0500 Subject: [PATCH] use np.linalg.norm --- yt/visualization/plot_window.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yt/visualization/plot_window.py b/yt/visualization/plot_window.py index f23be9c1df..65a4327d81 100644 --- a/yt/visualization/plot_window.py +++ b/yt/visualization/plot_window.py @@ -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),