Commit 65a047ab authored by alat-rights's avatar alat-rights
Browse files

Minor formatting changes

parent 204bab59
Loading
Loading
Loading
Loading
+15 −9
Original line number Diff line number Diff line
@@ -49,9 +49,11 @@ class OneHotFeaturizer(MolecularFeaturizer):
                log_every_n: int = 1000) -> np.ndarray:
    datapoints = list(datapoints)
    if (len(datapoints) < 1):
      print("No datapoints are present in the parameter Iterable, so we return an empty array.")
      print(
          "No datapoints are present in the parameter Iterable, so we return an empty array."
      )
      return np.array([])
    ic(type(datapoints[0]))

    # Featurize Mol data
    if (type(datapoints[0]) == RDKitMol):  # Mol
      return MolecularFeaturizer.featurize(self, datapoints, log_every_n)
@@ -59,7 +61,9 @@ class OneHotFeaturizer(MolecularFeaturizer):
    elif (type(datapoints[0]) == str):  # String
      return Featurizer.featurize(self, datapoints, log_every_n)
    else:
      print("One hot featurizer only supports strings and mols at this time, so returning {}")
      print(
          "One hot featurizer only supports strings and mols at this time, so returning {}"
      )
      return np.array([])

  def _featurize(self, datapoint: Any):
@@ -69,7 +73,9 @@ class OneHotFeaturizer(MolecularFeaturizer):
    elif (type(datapoint) == RDKitMol):
      return self._featurizeMol(datapoint)
    else:
      print("One hot featurizer only supports strings and mols at this time, so returning {}")
      print(
          "One hot featurizer only supports strings and mols at this time, so returning {}"
      )
      return np.array([])

  def _featurizeString(self, string: str) -> np.ndarray: