1 from __future__
import print_function
4 from complex
import real, imag, ascomplex
11 Z = np.zeros((rows, cols), dtype=dtype)
12 Z.real = np.random.rand(rows, cols)
13 Z.imag = np.random.rand(rows, cols)
16 assert (Z_real == Z.real).all()
18 assert (Z_imag == Z.imag).all()
20 Y = np.ones((rows, cols))
22 assert (Y_complex.real == Y).all()
23 assert (Y_complex.imag == np.zeros((rows, cols))).all()
Eigen::Matrix< typename ComplexMatrix::RealScalar, ComplexMatrix::RowsAtCompileTime, ComplexMatrix::ColsAtCompileTime, ComplexMatrix::Options > imag(const Eigen::MatrixBase< ComplexMatrix > &complex_mat)
Eigen::Matrix< std::complex< Scalar >, Rows, Cols, Options > ascomplex(const Eigen::Matrix< Scalar, Rows, Cols, Options > &mat)
Eigen::Matrix< typename ComplexMatrix::RealScalar, ComplexMatrix::RowsAtCompileTime, ComplexMatrix::ColsAtCompileTime, ComplexMatrix::Options > real(const Eigen::MatrixBase< ComplexMatrix > &complex_mat)