Skip to content

Commit ea73919

Browse files
committed
Update how a float array is specified for newer versions of Numpy
1 parent 1e81528 commit ea73919

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

lib/matplotlib/lines.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -387,26 +387,26 @@ def recache(self, always=False):
387387
if always or self._invalidx:
388388
xconv = self.convert_xunits(self._xorig)
389389
if ma.isMaskedArray(self._xorig):
390-
x = ma.asarray(xconv, float)
390+
x = ma.asarray(xconv, np.float_)
391391
else:
392-
x = np.asarray(xconv, float)
392+
x = np.asarray(xconv, np.float_)
393393
x = x.ravel()
394394
else:
395395
x = self._x
396396
if always or self._invalidy:
397397
yconv = self.convert_yunits(self._yorig)
398398
if ma.isMaskedArray(self._yorig):
399-
y = ma.asarray(yconv, float)
399+
y = ma.asarray(yconv, np.float_)
400400
else:
401-
y = np.asarray(yconv, float)
401+
y = np.asarray(yconv, np.float_)
402402
y = y.ravel()
403403
else:
404404
y = self._y
405405

406406
if len(x)==1 and len(y)>1:
407-
x = x * np.ones(y.shape, float)
407+
x = x * np.ones(y.shape, np.float_)
408408
if len(y)==1 and len(x)>1:
409-
y = y * np.ones(x.shape, float)
409+
y = y * np.ones(x.shape, np.float_)
410410

411411
if len(x) != len(y):
412412
raise RuntimeError('xdata and ydata must be the same length')
@@ -746,7 +746,7 @@ def set_marker(self, marker):
746746
%(MarkerAccepts)s
747747
"""
748748
self._marker.set_marker(marker)
749-
749+
750750
def set_markeredgecolor(self, ec):
751751
"""
752752
Set the marker edge color

0 commit comments

Comments
 (0)