1 from __future__
import print_function
12 Z = np.zeros((rows,cols),dtype=dtype)
13 Z.real = np.random.rand(rows,cols)
14 Z.imag = np.random.rand(rows,cols)
17 assert (Z_real == Z.real).all()
19 assert (Z_imag == Z.imag).all()
21 Y = np.ones((rows,cols))
23 assert (Y_complex.real == Y).all()
24 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)