[SciPy-user] ufunc question

Robert Kern rkern at ucsd.edu
Wed Apr 13 16:24:27 CDT 2005


Steve Sullivan <Steve Sullivan wrote:
> Why does the scipy ufunc "greater" differ from Numeric ...
> and what is the 'b' in scipy's result?
> 
> 
>>>>import Numeric, scipy
>>>>Numeric.greater( [1,2,3,4,5], 2)
> 
> array([0, 0, 1, 1, 1])
> 
>>>>scipy.greater( [1,2,3,4,5], 2)
> 
> array([0, 0, 1, 1, 1],'b')
> 
> 
>>>>scipy.info(scipy.greater)
> 
> greater(x,y) is array of 1's where x > y, 0 otherwise.
> 
> I looked for more complete docs on scipy's version, but found none.
> Many thanks,

Most of the comparison functions have been changed to output bytes 
instead of ints to save space.

-- 
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