[SciPy-user] Most Basic of Matrix

Robert Kern rkern at ucsd.edu
Sat Sep 25 15:07:06 CDT 2004


quendor at nandor.net wrote:
> I forgive in advance what will probably be the lamest of questions. I  
> am new to scipy. I can select an element of a matrix, but  seem unable  
> to change the element. Am I using the wrong API?
> 
> When I run the following code:
> 
> #!/usr/bin/python
> from scipy import *
> 
> A = mat([[1,2],[3,4]])
> print A[1,1]
> A[1,1] = 100

This works fine for me on OS X 10.3, Python 2.3, SciPy CVS, and Numeric 
23.3. What versions of SciPy and Numeric are you using?

-- 
Robert Kern
rkern at ucsd.edu

"In the fields of hell where the grass grows high
  Are the graves of dreams allowed to die."
   -- Richard Harter



More information about the SciPy-user mailing list