Skip to content

Commit

Permalink
fix typing error in mol.py
Browse files Browse the repository at this point in the history
  • Loading branch information
PatReis committed Feb 17, 2023
1 parent d5bcc81 commit 81ef02f
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions kgcnn/data/transform/scaler/mol.py
Original file line number Diff line number Diff line change
Expand Up @@ -807,7 +807,11 @@ def __init__(self, scaler: list):
raise ValueError("Unsupported scaler type '%s'." % x)

# noinspection PyPep8Naming
def fit_transform(self, y=None, *, X=None, copy=True, sample_weight=None, atomic_number=None):
def fit_transform(self, y: Union[np.ndarray, List[np.ndarray]] = None,
X: Union[np.ndarray, List[np.ndarray], None] = None,
atomic_number: Union[np.ndarray, List[np.ndarray], None] = None,
copy: bool = True,
sample_weight=None):
r"""Fit and transform all target labels for QM.
Args:
Expand All @@ -826,7 +830,7 @@ def fit_transform(self, y=None, *, X=None, copy=True, sample_weight=None, atomic
# noinspection PyPep8Naming
def transform(self, y: Union[np.ndarray, List[np.ndarray]] = None,
X: Union[np.ndarray, List[np.ndarray], None] = None,
atomic_number: List[np.ndarray, None] = None,
atomic_number: Union[np.ndarray, List[np.ndarray], None] = None,
copy=True):
r"""Transform all target labels for QM. Requires :obj:`fit()` called previously.
Expand Down Expand Up @@ -855,7 +859,7 @@ def transform(self, y: Union[np.ndarray, List[np.ndarray]] = None,
# noinspection PyPep8Naming
def fit(self, y: Union[np.ndarray, List[np.ndarray]] = None,
X: Union[np.ndarray, List[np.ndarray], None] = None,
atomic_number: List[np.ndarray, None] = None,
atomic_number: Union[np.ndarray, List[np.ndarray], None] = None,
sample_weight=None):
r"""Fit scaling of QM graph labels or targets.
Expand All @@ -878,7 +882,7 @@ def fit(self, y: Union[np.ndarray, List[np.ndarray]] = None,
# noinspection PyPep8Naming
def inverse_transform(self, y: Union[np.ndarray, List[np.ndarray]] = None,
X: Union[np.ndarray, List[np.ndarray], None] = None,
atomic_number: List[np.ndarray, None] = None,
atomic_number: Union[np.ndarray, List[np.ndarray], None] = None,
copy: bool = True):
r"""Back-transform all target labels for QM.
Expand Down

0 comments on commit 81ef02f

Please sign in to comment.