Skip to content

Commit

Permalink
fix: make indexing compatible with py3.10
Browse files Browse the repository at this point in the history
  • Loading branch information
alexfikl authored and inducer committed Oct 12, 2024
1 parent 6bfbc81 commit 84d5e08
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions meshmode/discretization/poly_element.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 84d5e08

Please sign in to comment.