[visionegg] mu.arange TypeError

  • From: Paul <pivanov314@xxxxxxxxx>
  • To: visionegg@xxxxxxxxxxxxx
  • Date: Mon, 25 May 2009 11:42:31 -0700

Hi,

    I'm getting a strange mu.arange TypeError when running a script, but
    not when I turn on pdb in ipython and try to re-execute the same line that
    throws the error.

    As you can see from the stack trace, I'm using VisionEgg-1.1.2
    (though I also had to apply the patch from changest 1533 for
     PyOpenGL3) 
    
    [ I've actually also just tried it using SVN head and
    get the same stack trace ]

    numpy.__version__ is 1.2.1

/home/pi/code/Dimstim/Bars.pyc in bars(preexpSec, postexpSec, orioff, ori, 
speedDegSec, xposDeg, yposDeg, widthDeg, heightDeg, brightness, antialiase, 
bgbrightness, sweeptimeSec, postsweepSec, varlist, nruns, shuffleRuns, 
blankSweep, shuffleBlankSweeps)
    187         # Init vars for main loop
    188         nvsyncsdisplayed = 0 # 1 based, init as 0
--> 189         vsynctimer = VsyncTimer()
    190         for var in sweeptable: # init local copies of vars in 
sweeptable to their vals at first sweep in sweeplist
    191                 exec(var + '= sweeptable[\'' + var + 
'\'][sweeplist[0]]') # ie set var = sweeptable[var][sweeplist[0]], e.g. 
ori=sweeptable['ori'][sweeplist[0]]

/usr/local/lib/python2.6/dist-packages/visionegg-1.1.2-py2.6-linux-i686.egg/VisionEgg/Core.py
 in __init__(self, bin_start_msec, bin_stop_msec, bin_width_msec, 
running_average_num_frames, save_all_frametimes)
   1519     def __init__(self, bin_start_msec=2, bin_stop_msec=28, 
bin_width_msec=2, running_average_num_frames=0,save_all_frametimes=False):
   1520         """Create instance of FrameTimer."""
-> 1521         self.bins = Numeric.arange( bin_start_msec, bin_stop_msec, 
bin_width_msec )
   1522         self.bin_width_msec = float(bin_width_msec)
   1523         self.timing_histogram = Numeric.zeros( self.bins.shape, 
Numeric.Float ) # make float to avoid (early) overflow errors

/usr/lib/python2.6/dist-packages/numpy/oldnumeric/functions.pyc in 
arange(start, stop, step, typecode, dtype)
     99 def arange(start, stop=None, step=1, typecode=None, dtype=None):
    100     dtype = convtypecode2(typecode, dtype)
--> 101     return mu.arange(start, stop, step, dtype)
    102 
    103 def fromstring(string, typecode='l', count=-1, dtype=None):

TypeError: function takes exactly 2 arguments (1 given)
WARNING: Failure executing file: <bars.py>

In [2]: debug
> /usr/lib/python2.6/dist-packages/numpy/oldnumeric/functions.py(101)arange()
    100     dtype = convtypecode2(typecode, dtype)
--> 101     return mu.arange(start, stop, step, dtype)
    102 

ipdb> mu.arange(start, stop, step, dtype)
array([ 2,  4,  6,  8, 10, 12, 14, 16, 18, 20, 22, 24, 26])


    I appreciate the help,
    Paul 
======================================
The Vision Egg mailing list
Archives: //www.freelists.org/archives/visionegg
Website: http://www.visionegg.org/mailinglist.html

Other related posts: