[Numpy-discussion] Regarding Matrices
Satya Upadhya
satyaupadhya at yahoo.co.in
Mon Aug 14 15:44:05 EDT 2006
Dear All,
Just a few queries regarding matrices. On my python shell i typed:
>>> from Numeric import *
>>> from LinearAlgebra import *
>>> A = [1,2,3,4,5,6,7,8,9]
>>> B = reshape(A,(3,3))
>>> B
array([[1, 2, 3],
[4, 5, 6],
[7, 8, 9]])
>>> X = identity(3)
>>> X
array([[1, 0, 0],
[0, 1, 0],
[0, 0, 1]])
>>> D = power(B,0)
>>> D
array([[1, 1, 1],
[1, 1, 1],
[1, 1, 1]])
the power function is giving a resultant matrix in which each element of matrix B is raised to the power of 0 so as to make it 1. But, taken as a whole i.e. matrix B to the power of 0 should have given the identity matrix.
Also, what is the procedure for taking the log of an entire matrix (log(A) where A is a matrix takes the log of every individual element in A, but thats not the same as taking the log of the entire matrix)
Thanking you,
Satya
---------------------------------
Here's a new way to find what you're looking for - Yahoo! Answers
Send FREE SMS to your friend's mobile from Yahoo! Messenger Version 8. Get it NOW
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20060814/53f3dee8/attachment.html>
More information about the NumPy-Discussion
mailing list