mtype_to_scitype(mtype: str, return_unique=False, coerce_to_list=False)[source]#

Infer scitype belonging to mtype.

mtypestr, or list of str, or nested list/str object, or None

mtype(s) to find scitype of, a valid mtype string valid mtype strings, with explanation, are in datatypes.MTYPE_REGISTER

scitypestr, or list of str, or nested list/str object, or None

if str, returns scitype belonging to mtype, if mtype is str if list, returns this function element-wise applied if nested list/str object, replaces mtype str by scitype str if None, returns None

return_uniquebool, default=False

if True, makes return unique

coerce_to_listbool, default=Fakse

if True, coerces rerturn to list, even if one-element

TypeError, if input is not of the type specified
ValueError, if there are two scitypes for the/some mtype string

(this should not happen in general, it means there is a bug)

ValueError, if there is no scitype for the/some mtype string