Skip to content

Commit 2ca3740

Browse files
committed
trying to get tests to pass
1 parent 06f3d24 commit 2ca3740

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

pynumdiff/utils/evaluate.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ def metrics(x, dt, x_hat, dxdt_hat, x_truth=None, dxdt_truth=None, padding=0):
8888

8989
# RMS of dxdt and x_hat
9090
root = np.sqrt(s.stop - s.start)
91-
rms_dxdt = np.linalg.norm(dxdt_hat[s] - dxdt_truth[s]) / root if dxdt_truth else None
92-
rms_x = np.linalg.norm(x_hat[s] - x_truth[s]) / root if x_truth else None
91+
rms_dxdt = np.linalg.norm(dxdt_hat[s] - dxdt_truth[s]) / root if dxdt_truth is not None else None
92+
rms_x = np.linalg.norm(x_hat[s] - x_truth[s]) / root if x_truth is not None else None
9393

9494
# RMS reconstructed x from integrating dxdt vs given raw x, available even in the absence of ground truth
9595
rec_x = utility.integrate_dxdt_hat(dxdt_hat, dt)

0 commit comments

Comments
 (0)