> I'll call this a bug in NumPy's broadcasting. "x == 1" should have > returned:
This is probably related: In [22]: a = np.array(['a','b']) In [23]: a + 'c' --------------------------------------------------------------------------- TypeError Traceback (most recent call last) C:\Windows\system32\<string> in <module>() TypeError: unsupported operand type(s) for +: 'numpy.ndarray' and 'str' In [24]: a + 1 --------------------------------------------------------------------------- TypeError Traceback (most recent call last) C:\Windows\system32\<string> in <module>() TypeError: unsupported operand type(s) for +: 'numpy.ndarray' and 'int' Operator + not supported for types numpy.ndarray and int??? I think a ticket on the bug tracker is due. Sturla _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion