parameters: (self, *args, **kwargs)
docstring: Infer the type of outputs and arguments of given known types of arguments.
  
          User can either pass in the known types in positional way or keyword argument way.
          Tuple of Nones is returned if there is not enough information passed in.
          An error will be raised if there is inconsistency found in the known types passed in.
  
          Parameters
          ----------
          *args :
              Provide type of arguments in a positional way.
              Unknown type can be marked as None
  
          **kwargs :
              Provide keyword arguments of known types.
  
          Returns
          -------
          arg_types : list of numpy.dtype or None
              List of types of arguments.
              The order is in the same order as list_arguments()
          out_types : list of numpy.dtype or None
              List of types of outputs.
              The order is in the same order as list_outputs()
          aux_types : list of numpy.dtype or None
              List of types of outputs.
              The order is in the same order as list_auxiliary()
docstring_summary: Infer the type of outputs and arguments of given known types of arguments.
docstring_tokens: Infer the type of outputs and arguments of given known types of arguments .
function: def infer_type(self, *args, **kwargs):
          """Infer the type of outputs and arguments of given known types of arguments.
  
          User can either pass in the known types in positional way or keyword argument way.
          Tuple of Nones is returned if there is not enough information passed in.
          An error will be raised if there is inconsistency found in the known types passed in.
  
          Parameters
          ----------
          *args :
              Provide type of arguments in a positional way.
              Unknown type can be marked as None
  
          **kwargs :
              Provide keyword arguments of known types.
  
          Returns
          -------
          arg_types : list of numpy.dtype or None
              List of types of arguments.
              The order is in the same order as list_arguments()
          out_types : list of numpy.dtype or None
              List of types of outputs.
              The order is in the same order as list_outputs()
          aux_types : list of numpy.dtype or None
              List of types of outputs.
              The order is in the same order as list_auxiliary()
          """
          # pylint: disable=too-many-locals
          if len(args) != 0 and len(kwargs) != 0:
              raise ValueError('Can only specify known argument \
                      types either by positional or kwargs way.')
          sdata = []
          if len(args) != 0:
              keys = None
              for s in args:
                  if s is not None:
                      s = numpy.dtype(s).type
                      if s not in _DTYPE_NP_TO_MX:
                          raise TypeError('Argument need to be one of '+str(_DTYPE_NP_TO_MX))
                      sdata.append(_DTYPE_NP_TO_MX[s])
                  else:
                      sdata.append(-1)
          else:
              keys = []
              for k, v in kwargs.items():
                  v = numpy.dtype(v).type
                  if v in _DTYPE_NP_TO_MX:
                      keys.append(c_str(k))
                      sdata.append(_DTYPE_NP_TO_MX[v])
          arg_type_size = mx_uint()
          arg_type_data = ctypes.POINTER(ctypes.c_int)()
          out_type_size = mx_uint()
          out_type_data = ctypes.POINTER(ctypes.c_int)()
          aux_type_size = mx_uint()
          aux_type_data = ctypes.POINTER(ctypes.c_int)()
          complete = ctypes.c_int()
          check_call(_LIB.MXSymbolInferType(
              self.handle,
              mx_uint(len(sdata)),
              c_array(ctypes.c_char_p, keys),
              c_array(ctypes.c_int, sdata),
              ctypes.byref(arg_type_size),
              ctypes.byref(arg_type_data),
              ctypes.byref(out_type_size),
              ctypes.byref(out_type_data),
              ctypes.byref(aux_type_size),
              ctypes.byref(aux_type_data),
              ctypes.byref(complete)))
          if complete.value != 0:
              arg_types = [
                  _DTYPE_MX_TO_NP[arg_type_data[i]] for i in range(arg_type_size.value)]
              out_types = [
                  _DTYPE_MX_TO_NP[out_type_data[i]] for i in range(out_type_size.value)]
              aux_types = [
                  _DTYPE_MX_TO_NP[aux_type_data[i]] for i in range(aux_type_size.value)]
              return (arg_types, out_types, aux_types)
          else:
              return (None, None, None)
function_tokens: def infer_type ( self , * args , * * kwargs ) : # pylint: disable=too-many-locals if len ( args ) != 0 and len ( kwargs ) != 0 : raise ValueError ( 'Can only specify known argument \
                      types either by positional or kwargs way.' ) sdata = [ ] if len ( args ) != 0 : keys = None for s in args : if s is not None : s = numpy . dtype ( s ) . type if s not in _DTYPE_NP_TO_MX : raise TypeError ( 'Argument need to be one of ' + str ( _DTYPE_NP_TO_MX ) ) sdata . append ( _DTYPE_NP_TO_MX [ s ] ) else : sdata . append ( - 1 ) else : keys = [ ] for k , v in kwargs . items ( ) : v = numpy . dtype ( v ) . type if v in _DTYPE_NP_TO_MX : keys . append ( c_str ( k ) ) sdata . append ( _DTYPE_NP_TO_MX [ v ] ) arg_type_size = mx_uint ( ) arg_type_data = ctypes . POINTER ( ctypes . c_int ) ( ) out_type_size = mx_uint ( ) out_type_data = ctypes . POINTER ( ctypes . c_int ) ( ) aux_type_size = mx_uint ( ) aux_type_data = ctypes . POINTER ( ctypes . c_int ) ( ) complete = ctypes . c_int ( ) check_call ( _LIB . MXSymbolInferType ( self . handle , mx_uint ( len ( sdata ) ) , c_array ( ctypes . c_char_p , keys ) , c_array ( ctypes . c_int , sdata ) , ctypes . byref ( arg_type_size ) , ctypes . byref ( arg_type_data ) , ctypes . byref ( out_type_size ) , ctypes . byref ( out_type_data ) , ctypes . byref ( aux_type_size ) , ctypes . byref ( aux_type_data ) , ctypes . byref ( complete ) ) ) if complete . value != 0 : arg_types = [ _DTYPE_MX_TO_NP [ arg_type_data [ i ] ] for i in range ( arg_type_size . value ) ] out_types = [ _DTYPE_MX_TO_NP [ out_type_data [ i ] ] for i in range ( out_type_size . value ) ] aux_types = [ _DTYPE_MX_TO_NP [ aux_type_data [ i ] ] for i in range ( aux_type_size . value ) ] return ( arg_types , out_types , aux_types ) else : return ( None , None , None )