[Numpy-discussion] unexpected behavior with allclose( scalar, empty array)

Alan G Isaac aisaac@american....
Thu Jan 3 15:31:14 CST 2008


> On Thu, 3 Jan 2008, Charles R Harris apparently wrote:
>> Isn't it trivially true that all elements of an empty 
>> array are close to any number? 

On Thu, 3 Jan 2008, Alan G Isaac apparently wrote:
> Sure, but might not one expect a ValueError due to 
> shape mismatch?  (Doesn't allclose usually use 
> normal broadcasting rules?)

Ooops, forgot that was a "scalar", so it was "normal":

>>> a*b
array([], dtype=int32)

Cheers,
Alan Isaac






More information about the Numpy-discussion mailing list