[Numpy-discussion] Question about numpy.max(<complex matrix>)
Gael Varoquaux
gael.varoquaux@normalesup....
Fri Sep 21 19:33:16 CDT 2007
On Fri, Sep 21, 2007 at 08:27:51PM -0400, Stuart Brorson wrote:
> >>> a
> array([[ 1. +1.j , 1. +2.j ],
> [ 2. +1.j , 1.9+1.9j]])
> >>> numpy.max(a)
> (2+1j)
This is numpy. You are dealing with arrays, so its numpy.
> >>> a = 2+1j
> >>> b = 2+2j
> >>> a>b
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> TypeError: no ordering relation is defined for complex numbers
> >>> a<b
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> TypeError: no ordering relation is defined for complex numbers
This is plain Python. You are not dealing with arrays.
So you are saying numpy is inconsistent with Python. Fair enough, numpy's
goals aren't really the same as Python's.
Gaël
More information about the Numpy-discussion
mailing list