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

Skip to content

Commit b8a37db

Browse files
committed
Use np.empty for a small speed improvement.
1 parent d56aaa1 commit b8a37db

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/matplotlib/path.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ def make_compound_path(cls, *args):
179179
vertices = np.vstack([x.vertices for x in args])
180180
vertices.reshape((total_length, 2))
181181

182-
codes = np.ones(total_length, dtype=cls.code_type)
182+
codes = np.empty(total_length, dtype=cls.code_type)
183183
i = 0
184184
for path in args:
185185
if path.codes is None:

0 commit comments

Comments
 (0)