From 2e1935d6a75d29c900ad50bc84ed4b4b8138775c Mon Sep 17 00:00:00 2001 From: Alexandru Fikl Date: Tue, 9 Jun 2020 18:50:53 -0500 Subject: [PATCH] fix simplex_interp_error_matrix for 1d modes --- modepy/modal_decay.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modepy/modal_decay.py b/modepy/modal_decay.py index dee45fe..8eeb18b 100644 --- a/modepy/modal_decay.py +++ b/modepy/modal_decay.py @@ -67,7 +67,10 @@ def simplex_interp_error_coefficient_estimator_matrix( vdm = vandermonde(basis, unit_nodes) vdm_inv = la.inv(vdm) - order_vector = np.array([sum(mode_id) for mode_id in mode_ids]) + if dim > 1: + order_vector = np.array([sum(mode_id) for mode_id in mode_ids]) + else: + order_vector = mode_ids max_order = np.max(order_vector) assert max_order == order -- GitLab