scitype_to_mtype#

scitype_to_mtype(scitype: str, softdeps: str = 'exclude')[source]#

Return list of all mtypes belonging to scitype.

Parameters:
scitypestr, or list of str

scitype(s) to find mtypes for, a valid scitype string valid scitype strings, with explanation, are in datatypes.SCITYPE_REGISTER

softdepsstr, optional, default = “exclude”

whether to return mtypes that require soft dependencies “exclude” = only mtypes that do not require soft dependencies are returned “present” = only mtypes with soft deps satisfied by the environment are returned “all” = all mtypes, irrespective of soft deps satisfied or required, returned any other value defaults to “all”

Returns:
mtypeslist of str

all mtypes such that mtype_to_scitype(element) is in the list scitype if list, returns this function element-wise applied if nested list/str object, replaces mtype str by scitype str if None, returns None

Raises:
TypeError, if input is not of the type specified
ValueError, if one of the strings is not a valid scitype string
RuntimeError, if there is no mtype for the/some scitype string (this must be a bug)