Skip to content

Commit

Permalink
Precomputed dtype check fix for #3
Browse files Browse the repository at this point in the history
  • Loading branch information
lewismervin1 committed Mar 25, 2024
1 parent d1948ea commit aacc080
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Binary file modified .DS_Store
Binary file not shown.
6 changes: 3 additions & 3 deletions optunaz/descriptors.py
Original file line number Diff line number Diff line change
Expand Up @@ -560,9 +560,9 @@ def calculate_from_smi(self, smi: str) -> np.ndarray:
f"Multiple descriptors found for {smi}, taking the first one."
)
descriptor_iloc = rows[self.parameters.response_column].iloc[0]
if type(descriptor_iloc) == np.float64:
return np.array([descriptor_iloc])
else:
try:
return np.array([descriptor_iloc.astype(float)])
except (ValueError, AttributeError):
fp = np.fromstring(descriptor_iloc, sep=",")
if len(fp) == 0:
return None
Expand Down

0 comments on commit aacc080

Please sign in to comment.