Method: Matrix#real

Defined in:
lib/matrix.rb

#realObject

Returns the real part of the matrix.

Matrix[[Complex(1,2), Complex(0,1), 0], [1, 2, 3]]
#  => 1+2i  i  0
#        1  2  3
Matrix[[Complex(1,2), Complex(0,1), 0], [1, 2, 3]].real
#  =>    1  0  0
#        1  2  3


1569
1570
1571
# File 'lib/matrix.rb', line 1569

def real
  collect(&:real)
end