Skip to content

Commit

Permalink
Update _check.py
Browse files Browse the repository at this point in the history
  • Loading branch information
fkiraly committed Sep 12, 2023
1 parent f94c04f commit 05bb76a
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions skpro/datatypes/_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
"mtype",
]

from typing import List, Union

import numpy as np

from skpro.datatypes._common import _metadata_requested, _ret
Expand Down Expand Up @@ -80,7 +78,7 @@ def _coerce_list_of_str(obj, var_name="obj"):

def check_is_mtype(
obj,
mtype: Union[str, List[str]],
mtype,
scitype: str = None,
return_metadata=False,
var_name="obj",
Expand Down Expand Up @@ -237,11 +235,7 @@ def check_raise(obj, mtype: str, scitype: str = None, var_name: str = "input"):
raise TypeError(msg)


def mtype(
obj,
as_scitype: Union[str, List[str]] = None,
exclude_mtypes=AMBIGUOUS_MTYPES,
):
def mtype(obj, as_scitype=None, exclude_mtypes=AMBIGUOUS_MTYPES):
"""Infer the mtype of an object considered as a specific scitype.
Parameters
Expand Down Expand Up @@ -320,7 +314,7 @@ def mtype(

def check_is_scitype(
obj,
scitype: Union[str, List[str]],
scitype,
return_metadata=False,
var_name="obj",
exclude_mtypes=AMBIGUOUS_MTYPES,
Expand Down

0 comments on commit 05bb76a

Please sign in to comment.