thegooglecodearchive / mpmath

Automatically exported from code.google.com/p/mpmath
Other
0 stars 0 forks source link

matrix class index slicing #200

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The attached patch will change the matrix class so that it can accept slice 
indexing

The following statements a now valid
- Submatrix extraction (e.g. A = B[:,4]).
- Submatrix assignment with a matrix only if the slice and the input have the 
same dimensions (e.g. A[4,:3] = B, where be is 1x3 matrix). 
- Submatrix assignment with a scalar (e.g. A[:,:] = 1).

Additionally the patch contains an updated test_matrices.py file to include a 
set of test cases for the new functionality.

Comments and suggestions are welcome
Ioannis Tziakos   

Original issue reported on code.google.com by ITzia...@gmail.com on 4 Sep 2010 at 2:17

Attachments:

GoogleCodeExporter commented 9 years ago
Committed in r1189. This is extremely useful, thanks a lot!

Original comment by fredrik....@gmail.com on 8 Sep 2010 at 11:02