Hi Donald
On Thu, Oct 04, 2007 at 01:48:18AM +, Donald Fredkin wrote:
> It appears that something peculiar is going on with the numpy function
> trace(). The docs say that trace(A,...) is identical to A.trace(...).
> Here is a test:
>
> A = arange(8).reshape((2,2,2))
> A.trace(0,1,2)
> #[Out]
It appears that something peculiar is going on with the numpy function
trace(). The docs say that trace(A,...) is identical to A.trace(...).
Here is a test:
A = arange(8).reshape((2,2,2))
A.trace(0,1,2)
#[Out]# array([ 3, 11])
# which is correct
trace(A,0,1,2)
#[Out]# array([6, 8])
#which is wrong