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

Skip to content

Commit de37bc5

Browse files
committed
Explicitly specify the dtype in np.full
1 parent 5a1e7b3 commit de37bc5

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

lib/matplotlib/axes/_axes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4000,7 +4000,7 @@ def dopatch(xs, ys, **kwargs):
40004000
# maybe draw the fliers
40014001
if showfliers:
40024002
# fliers coords
4003-
flier_x = np.full(len(stats['fliers']), pos)
4003+
flier_x = np.full(len(stats['fliers']), pos, dtype='float64')
40044004
flier_y = stats['fliers']
40054005

40064006
fliers.extend(doplot(

lib/matplotlib/hatch.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,8 @@ def __init__(self, hatch, density):
169169
self.num_rows = (hatch.count('*')) * density
170170
path = Path.unit_regular_star(5)
171171
self.shape_vertices = path.vertices
172-
self.shape_codes = np.full(len(self.shape_vertices), Path.LINETO)
172+
self.shape_codes = np.full(len(self.shape_vertices), Path.LINETO,
173+
dtype='float64')
173174
self.shape_codes[0] = Path.MOVETO
174175
Shapes.__init__(self, hatch, density)
175176

lib/matplotlib/path.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,8 @@ def interpolated(self, steps):
552552
vertices = simple_linear_interpolation(self.vertices, steps)
553553
codes = self.codes
554554
if codes is not None:
555-
new_codes = np.full(((len(codes) - 1) * steps + 1, ), Path.LINETO)
555+
new_codes = np.full(((len(codes) - 1) * steps + 1, ), Path.LINETO,
556+
dtype='float64')
556557
new_codes[0::steps] = codes
557558
else:
558559
new_codes = None
@@ -802,7 +803,7 @@ def unit_circle_righthalf(cls):
802803

803804
float)
804805

805-
codes = np.full(14, cls.CURVE4)
806+
codes = np.full(14, cls.CURVE4, dtype='float64')
806807
codes[0] = cls.MOVETO
807808
codes[-1] = cls.CLOSEPOLY
808809

0 commit comments

Comments
 (0)