>>> import numpy as np >>> x = np.array([[1+1j, 2+2j], [3+3j, 3+3j]]) >>> np.real(x) array([[ 1., 2.], >>> np.imag(x) array([[ 1., 2.], [ 3., 3.]])