8000 Merge pull request #5065 from ianthomas23/4999_TriAnalyzer_mismatched… · matplotlib/matplotlib@40bc075 · GitHub
[go: up one dir, main page]

Skip to content

Commit 40bc075

Browse files
committed
Merge pull request #5065 from ianthomas23/4999_TriAnalyzer_mismatched_indexes
Bugfix for TriAnalyzer mismatched indexes
2 parents 6b429c9 + 039a82f commit 40bc075

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/matplotlib/tri/tritools.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ def scale_factors(self):
4848
4949
"""
5050
compressed_triangles = self._triangulation.get_masked_triangles()
51-
node_used = (np.bincount(np.ravel(compressed_triangles)) != 0)
51+
node_used = (np.bincount(np.ravel(compressed_triangles),
52+
minlength=self._triangulation.x.size) != 0)
5253
x = self._triangulation.x[node_used]
5354
y = self._triangulation.y[node_used]
5455
ux = np.max(x)-np.min(x)

0 commit comments

Comments
 (0)
0