Skip to content

Commit 0edc085

Browse files
committed
Fix ptp() error
1 parent 21f25ac commit 0edc085

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sfs/plot2d.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,8 +289,8 @@ def amplitude(p, grid, *, xnorm=None, cmap='coolwarm_clip',
289289
elif plotting_plane == 'yz':
290290
x, y = grid[[1, 2]]
291291

292-
dx = 0.5 * x.ptp() / p.shape[0]
293-
dy = 0.5 * y.ptp() / p.shape[1]
292+
dx = 0.5 * np.ptp(x) / p.shape[0]
293+
dy = 0.5 * np.ptp(y) / p.shape[1]
294294

295295
if ax is None:
296296
ax = _plt.gca()

0 commit comments

Comments
 (0)