File wxPython-numpy.patch of Package python-wxWidgets
diff -ruN orig/wxPython/wx/lib/plot.py new/wxPython/wx/lib/plot.py
--- orig/wxPython/wx/lib/plot.py 2011-03-28 22:48:35.000000000 +0300
+++ new/wxPython/wx/lib/plot.py 2015-01-14 02:28:36.786335732 +0200
@@ -115,7 +115,7 @@
# Needs Numeric or numarray or NumPy
try:
- import numpy.oldnumeric as _Numeric
+ import numpy as _Numeric
except:
try:
import numarray as _Numeric #if numarray is used it is renamed Numeric
@@ -142,7 +142,7 @@
"""
def __init__(self, points, attr):
- self._points = _Numeric.array(points).astype(_Numeric.Float64)
+ self._points = _Numeric.array(points).astype(_Numeric.float64)
self._logscale = (False, False)
self._pointSize = (1.0, 1.0)
self.currentScale= (1,1)
@@ -377,9 +377,9 @@
def _circle(self, dc, coords, size=1):
fact= 2.5*size
wh= 5.0*size
- rect= _Numeric.zeros((len(coords),4),_Numeric.Float)+[0.0,0.0,wh,wh]
+ rect= _Numeric.zeros((len(coords),4),_Numeric.float)+[0.0,0.0,wh,wh]
rect[:,0:2]= coords-[fact,fact]
- dc.DrawEllipseList(rect.astype(_Numeric.Int32))
+ dc.DrawEllipseList(rect.astype(_Numeric.int32))
def _dot(self, dc, coords, size=1):
dc.DrawPointList(coords)
@@ -387,35 +387,35 @@
def _square(self, dc, coords, size=1):
fact= 2.5*size
wh= 5.0*size
- rect= _Numeric.zeros((len(coords),4),_Numeric.Float)+[0.0,0.0,wh,wh]
+ rect= _Numeric.zeros((len(coords),4),_Numeric.float)+[0.0,0.0,wh,wh]
rect[:,0:2]= coords-[fact,fact]
- dc.DrawRectangleList(rect.astype(_Numeric.Int32))
+ dc.DrawRectangleList(rect.astype(_Numeric.int32))
def _triangle(self, dc, coords, size=1):
shape= [(-2.5*size,1.44*size), (2.5*size,1.44*size), (0.0,-2.88*size)]
poly= _Numeric.repeat(coords,3)
poly.shape= (len(coords),3,2)
poly += shape
- dc.DrawPolygonList(poly.astype(_Numeric.Int32))
+ dc.DrawPolygonList(poly.astype(_Numeric.int32))
def _triangle_down(self, dc, coords, size=1):
shape= [(-2.5*size,-1.44*size), (2.5*size,-1.44*size), (0.0,2.88*size)]
poly= _Numeric.repeat(coords,3)
poly.shape= (len(coords),3,2)
poly += shape
- dc.DrawPolygonList(poly.astype(_Numeric.Int32))
+ dc.DrawPolygonList(poly.astype(_Numeric.int32))
def _cross(self, dc, coords, size=1):
fact= 2.5*size
for f in [[-fact,-fact,fact,fact],[-fact,fact,fact,-fact]]:
lines= _Numeric.concatenate((coords,coords),axis=1)+f
- dc.DrawLineList(lines.astype(_Numeric.Int32))
+ dc.DrawLineList(lines.astype(_Numeric.int32))
def _plus(self, dc, coords, size=1):
fact= 2.5*size
for f in [[-fact,0,fact,0],[0,-fact,0,fact]]:
lines= _Numeric.concatenate((coords,coords),axis=1)+f
- dc.DrawLineList(lines.astype(_Numeric.Int32))
+ dc.DrawLineList(lines.astype(_Numeric.int32))
class PlotGraphics:
"""Container to hold PolyXXX objects and graph labels