From: Torgil S. <tor...@gm...> - 2006-08-14 21:03:07
|
>>> import numpy >>> numpy.__version__ '1.0b1' >>> from numpy import * >>> A = [1,2,3,4,5,6,7,8,9] >>> B = asmatrix(reshape(A,(3,3))) >>> B matrix([[1, 2, 3], [4, 5, 6], [7, 8, 9]]) >>> B**0 matrix([[ 1., 0., 0.], [ 0., 1., 0.], [ 0., 0., 1.]]) >>> power(B,0) matrix([[1, 1, 1], [1, 1, 1], [1, 1, 1]]) Shouldn't power() and the ** operator return the same result for matrixes? //Torgil |