Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5cea9ce

Browse files
authored
BUG: Correct invocation of expand_dims
`alpha` is 2d, yet here it was requested to insert a fourth dimension. This rightly produces an error in numpy 1.13.0rc1, although we might soften this to a deprecation warning
1 parent de2755c commit 5cea9ce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/tri/triinterpolate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -898,7 +898,7 @@ def get_bending_matrices(self, J, ecc):
898898
pts = self.gauss_pts
899899
for igauss in range(self.n_gauss):
900900
alpha = np.tile(pts[igauss, :], n).reshape(n, 3)
901-
alpha = np.expand_dims(alpha, 3)
901+
alpha = np.expand_dims(alpha, 2)
902902
weight = weights[igauss]
903903
d2Skdksi2 = self.get_d2Sidksij2(alpha, ecc)
904904
d2Skdx2 = _prod_vectorized(d2Skdksi2, H_rot)

0 commit comments

Comments
 (0)