watex.utils.funcutils.accept_types#

watex.utils.funcutils.accept_types(*objtypes, format=False)[source]#

List the type format that can be accepted by a function.

Parameters:
  • objtypes – List of object types.

  • format – bool - format the list of the name of objects.

Returns:

list of object type names or str of object names.

Example:
>>> import numpy as np; import pandas as pd
>>> from watex.utils.funcutils import accept_types
>>> accept_types (pd.Series, pd.DataFrame, tuple, list, str)
... "'Series','DataFrame','tuple','list' and 'str'"
>>> atypes= accept_types (
    pd.Series, pd.DataFrame,np.ndarray, format=True )
..."'Series','DataFrame' and 'ndarray'"