[SciPy-user] transition problems

Christian Kristukat ckkart at hoc.net
Mon Dec 12 04:32:19 EST 2005


Travis Oliphant wrote:
> Christian Kristukat wrote:
> 
> 
>>Hi,
>>I noticed that using the new core together with older packages that are based on 
>>numeric, like the plotting module from wxPython, matplotlib, grace_np.py, etc. 
>>is problematic since numeric seems to be unable to recognize new core arrays as 
>>equivalent to the numeric ones. 
>>
> 
> If you get a recent version (>=24.0) of Numeric then it shouldn't be a 
> problem. One of the purposes of the array interface is to ease the 
> transition, but only recent versions  of Numeric use it properly.  If 
> there are problems with recent versions of Numeric and the array 
> interface then please post them.
> 

Nice to hear that transition will be easy. Unfortunately I'm already using 
Numeric 24.0. I wrote a small example using wxPython which works with Numeric 
but doesn't with scipy.base:

import wx
from wx.lib import plot

from scipy.base import *
#from Numeric import *

class MyApp(wx.App):
     def OnInit(self):
         wx.InitAllImageHandlers()
         frame = plot.TestFrame(None, -1, "PlotCanvas")
         #frame.Show(True)
         gr = plot.PlotGraphics([plot.PolyLine(transpose([arange(10),arange(10)]))])
         frame.client.Draw(gr)
         self.SetTopWindow(frame)
         return True


app = MyApp(0)
app.MainLoop()

Regards, Christian




More information about the SciPy-User mailing list