08.02.2015 Views

Sage Reference Manual: Matrices and Spaces of Matrices - Mirrors

Sage Reference Manual: Matrices and Spaces of Matrices - Mirrors

Sage Reference Manual: Matrices and Spaces of Matrices - Mirrors

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

CHAPTER<br />

TWENTYONE<br />

DENSE MATRICES OVER THE<br />

COMPLEX DOUBLE FIELD USING<br />

NUMPY<br />

Dense matrices over the Complex Double Field using NumPy<br />

EXAMPLES:<br />

sage: b=Mat(CDF,2,3).basis()<br />

sage: b[0]<br />

[1.0 0.0 0.0]<br />

[0.0 0.0 0.0]<br />

We deal with the case <strong>of</strong> zero rows or zero columns:<br />

sage: m = MatrixSpace(CDF,0,3)<br />

sage: m.zero_matrix()<br />

[]<br />

TESTS:<br />

sage: a = matrix(CDF,2,[i+(4-i)*I for i in range(4)], sparse=False)<br />

sage: TestSuite(a).run()<br />

sage: Mat(CDF,0,0).zero_matrix().inverse()<br />

[]<br />

AUTHORS:<br />

• Jason Grout (2008-09): switch to NumPy backend<br />

• Josh Kantor<br />

• William Stein: many bug fixes <strong>and</strong> touch ups.<br />

class sage.matrix.matrix_complex_double_dense.Matrix_complex_double_dense<br />

Bases: sage.matrix.matrix_double_dense.Matrix_double_dense<br />

Class that implements matrices over the real double field. These are supposed to be fast matrix operations using<br />

C doubles. Most operations are implemented using numpy which will call the underlying BLAS on the system.<br />

EXAMPLES:<br />

sage: m = Matrix(CDF, [[1,2*I],[3+I,4]])<br />

sage: m**2<br />

[-1.0 + 6.0*I 10.0*I]<br />

[15.0 + 5.0*I 14.0 + 6.0*I]<br />

397

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!