8000 Use minlength kwarg · matplotlib/matplotlib@8ce11f2 · GitHub
[go: up one dir, main page]

Skip to content

Commit 8ce11f2

Browse files
committed
Use minlength kwarg
1 parent 207edcf commit 8ce11f2

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

lib/matplotlib/tri/triinterpolate.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1265,12 +1265,9 @@ def dot(self, V):
12651265
*V* dense vector of shape (self.m,)
12661266
"""
12671267
assert V.shape == (self.m,)
1268-
# For a more generic implementation we could use below kw argument
1269-
# minlength=self.m of bincount ; however:
1270-
# - it is new in numpy 1.6
1271-
# - it is unecessary when each row have at least 1 entry in global
1272-
# matrix, which is the case here.
1273-
return np.bincount(self.rows, weights=self.vals*V[self.cols])
1268+
return np.bincount(self.rows,
1269+
weights=self.vals*V[self.cols],
1270+
minlength=self.m)
12741271

12751272
def compress_csc(self):
12761273
"""

0 commit comments

Comments
 (0)
0