class_docstr: Dialect op for constructing a complex data from real and imaginary data.
class_docstr_tok: ["Dialect","op","for","constructing","a","complex","data","from","real","and","imaginary","data","."]
code: def type_inference(self):
      if self.real_data.shape != self.imag_data.shape:
          raise ValueError(
              f"The shape of real_data ({self.real_data.shape}) and imag_data "
              f"({self.imag_data.shape}) must match to construct complex data."
          )
      return types.tensor(
          infer_complex_dtype(
              self.real_data.dtype, self.imag_data.dtype
          ),
          self.real_data.shape,
      )
  
imports: from typing import Optional, Tuple
  import numpy
  from coremltools.converters.mil.mil import Operation, types
  from coremltools.converters.mil.mil.input_type import DefaultInputs, InputSpec, TensorInputType
  from coremltools.converters.mil.mil.ops.registry import SSAOpRegistry
  from coremltools.converters.mil.mil.types.symbolic import any_symbolic, is_symbolic
  from coremltools.converters.mil.mil.types.type_mapping import infer_complex_dtype, infer_fp_dtype_from_complex
  from coremltools.converters.mil.mil.var import ComplexVar, Var
label_desc: Use image node_id 1 for calling the complex obj's underlying member method code with example usage: obj.type_inference() and returns: types