[SciPy-user] new scipy_core put syntax

Robert Kern rkern at ucsd.edu
Mon Oct 31 15:20:17 CST 2005


Christian Kristukat wrote:
> Hi,
> I installed the new scipy_core and have problems using 'put':
> 
> In [1]:from scipy import *
> In [2]:a=zeros(10)
> In [3]:put(a,[2,3],3.4)
> ---------------------------------------------------------------------------
> exceptions.TypeError                                 Traceback (most recent call 
> last)
> /home/ck/<console>
> /usr/lib/python2.3/site-packages/scipy/base/oldnumeric.py in put(a, ind, v)
>      163     a = array(a,copy=False)
>      164     v = array(v,copy=False)
> --> 165     return a.put(a, ind, v.astype(a.dtype))
>      166
>      167 def putmask (a, mask, v):
> TypeError: function takes exactly 2 arguments (3 given)
> 
> Did the syntax change?

No, it's just a goof updating the older code to the new method
implementation. Just remove "a" from the parameter list. Fixed in SVN.

-- 
Robert Kern
rkern at ucsd.edu

"In the fields of hell where the grass grows high
 Are the graves of dreams allowed to die."
  -- Richard Harter



More information about the SciPy-user mailing list