Address FutureWarning about implicit float to int conversions
This commit is contained in:
parent
7199a4f4ce
commit
6ed8a405fe
@ -921,7 +921,7 @@ class AxisItem(GraphicsWidget):
|
||||
p2[axis] += tickLength*tickDir
|
||||
tickPen = self.pen()
|
||||
color = tickPen.color()
|
||||
color.setAlpha(lineAlpha)
|
||||
color.setAlpha(int(lineAlpha))
|
||||
tickPen.setColor(color)
|
||||
tickSpecs.append((tickPen, Point(p1), Point(p2)))
|
||||
profiler('compute ticks')
|
||||
@ -1078,7 +1078,7 @@ class AxisItem(GraphicsWidget):
|
||||
p.setFont(self.tickFont)
|
||||
p.setPen(self.textPen())
|
||||
for rect, flags, text in textSpecs:
|
||||
p.drawText(rect, flags, text)
|
||||
p.drawText(rect, flags.__int__(), text)
|
||||
|
||||
profiler('draw text')
|
||||
|
||||
|
@ -654,7 +654,7 @@ class GradientEditorItem(TickSliderItem):
|
||||
s = s1 * (1.-f) + s2 * f
|
||||
v = v1 * (1.-f) + v2 * f
|
||||
c = QtGui.QColor()
|
||||
c.setHsv(h,s,v)
|
||||
c.setHsv(*map(int, [h,s,v]))
|
||||
if toQColor:
|
||||
return c
|
||||
else:
|
||||
|
@ -153,7 +153,7 @@ class GridItem(UIGraphicsItem):
|
||||
continue
|
||||
|
||||
ppl = dim[ax] / nl[ax]
|
||||
c = np.clip(5.*(ppl-3), 0., 50.)
|
||||
c = np.clip(5 * (ppl-3), 0., 50.).astype(int)
|
||||
|
||||
linePen = self.opts['pen']
|
||||
lineColor = self.opts['pen'].color()
|
||||
|
Loading…
Reference in New Issue
Block a user