Functions for changing the base ring of matrices quickly¶
- sage.matrix.change_ring.integer_to_real_double_dense(A)¶
Fast conversion of a matrix over the integers to a matrix with real double entries.
- INPUT:
A – a dense matrix over the integers
- OUTPUT:
– a dense real double matrix
EXAMPLES:
sage: a = matrix(ZZ,2,3,[-2,-5,3,4,8,1030339830489349908]) sage: a.change_ring(RDF) [ -2.0 -5.0 3.0] [ 4.0 8.0 1.0303398304893499e+18] sage: import sage.matrix.change_ring sage: sage.matrix.change_ring.integer_to_real_double_dense(a) [ -2.0 -5.0 3.0] [ 4.0 8.0 1.0303398304893499e+18]