From 84d5e080e4b9c0faea032064347fdef0892b66ac Mon Sep 17 00:00:00 2001 From: Alexandru Fikl Date: Sat, 12 Oct 2024 19:07:21 +0300 Subject: [PATCH] fix: make indexing compatible with py3.10 --- meshmode/discretization/poly_element.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/meshmode/discretization/poly_element.py b/meshmode/discretization/poly_element.py index f6524306..91adcf4d 100644 --- a/meshmode/discretization/poly_element.py +++ b/meshmode/discretization/poly_element.py @@ -536,8 +536,9 @@ def quadrature_rule(self): nodes_tp = self._nodes for idim, (nodes, basis) in enumerate(zip(nodes_tp, self._basis.bases)): - # get current dimension's nodes from fastest varying axis - nodes = nodes[*(0,)*idim, :, *(0,)*(self.dim-idim-1)] + # get current dimension's nodes + iaxis = (*(0,)*idim, slice(None), *(0,)*(self.dim-idim-1)) + nodes = nodes[iaxis] nodes_1d = nodes.reshape(1, -1) mass_matrix = mp.mass_matrix(basis, nodes_1d)