def _build_doc(func_name,
               desc,
               arg_names,
               arg_types,
               arg_desc,
               key_var_num_args=None,
               ret_type=None):
    """Build docstring for symbolic functions."""
    param_str = _build_param_doc(arg_names, arg_types, arg_desc)
    if key_var_num_args:
        desc += '\nThis function support variable length of positional input.'
    doc_str = ('%s\n\n' +
               '%s\n' +
               'name : string, optional.\n' +
               '    Name of the resulting symbol.\n\n' +
               'Returns\n' +
               '-------\n' +
               'Symbol\n' +
               '    The result symbol.')
    doc_str = doc_str % (desc, param_str)
    extra_doc = "\n" + '\n'.join([x.__doc__ for x in type.__subclasses__(SymbolDoc)
                                  if x.__name__ == '%sDoc' % func_name])
    doc_str += _re.sub(_re.compile("    "), "", extra_doc)
    doc_str = _re.sub('NDArray-or-Symbol', 'Symbol', doc_str)
    return doc_str
def _build_doc ( func_name , desc , arg_names , arg_types , arg_desc , key_var_num_args = None , ret_type = None ) : param_str = _build_param_doc ( arg_names , arg_types , arg_desc ) if key_var_num_args : desc += '\nThis function support variable length of positional input.' doc_str = ( '%s\n\n' + '%s\n' + 'name : string, optional.\n' + '    Name of the resulting symbol.\n\n' + 'Returns\n' + '-------\n' + 'Symbol\n' + '    The result symbol.' ) doc_str = doc_str % ( desc , param_str ) extra_doc = "\n" + '\n' . join ( [ x . __doc__ for x in type . __subclasses__ ( SymbolDoc ) if x . __name__ == '%sDoc' % func_name ] ) doc_str += _re . sub ( _re . compile ( "    " ) , "" , extra_doc ) doc_str = _re . sub ( 'NDArray-or-Symbol' , 'Symbol' , doc_str ) return doc_str
Build docstring for symbolic functions.