code: def test_complex(self):
      rng = np.random.RandomState(2333)
      m = fmatrix()
      c = complex(m[0], m[1])
      assert c.type == cvector
      r, i = [real(c), imag(c)]
      assert r.type == fvector
      assert i.type == fvector
      f = theano.function([m], [r, i])
  
      mval = np.asarray(rng.randn(2, 5), dtype="float32")
      rval, ival = f(mval)
      assert np.all(rval == mval[0]), (rval, mval[0])
      assert np.all(ival == mval[1]), (ival, mval[1])
  
file_path: Theano/theano/tensor/tests/test_complex.py
imports: from __future__ import absolute_import, print_function, division
  import unittest
  from six.moves import xrange
  import theano
  import numpy
  from theano.tensor import *
  from theano.tests import unittest_tools
  from numpy.testing import dec
label_desc: Use image node_id 4 for calling the TestRealImag obj's underlying member method code with example usage: obj.test_complex() without return types