[SciPy-dev] logical array TypeError

Robert Cimrman cimrman3 at ntc.zcu.cz
Thu Nov 3 06:07:32 EST 2005


In [2]:a = scipy.rand(10 )
In [3]:a
Out[3]:
array([ 0.70999964,  0.33431269,  0.64182382,  0.5041205 ,  0.58857909,
         0.83947773,  0.4660244 ,  0.72767477,  0.73517386,  0.66661387])

In [4]:b = a > 0.2
In [5]:b
Out[5]:array([True, True, True, True, True, True, True, True, True, 
True], dtype=bool)

In [6]:b.dtype()
---------------------------------------------------------------------------
exceptions.TypeError                                 Traceback (most 
recent call last)

TypeError: function takes exactly 1 argument (0 given)

In [7]:a.dtype()
Out[7]:0.0




More information about the SciPy-Dev mailing list