Skip to content

Commit

Permalink
Merge pull request #55 from ecrl/update-alvadesc-utils
Browse files Browse the repository at this point in the history
Update alvadesc utils
  • Loading branch information
tjkessler authored Aug 29, 2024
2 parents 391d93d + 50528c2 commit 09b8eed
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions ecnet/datasets/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def _qspr_from_alvadesc(smiles: List[str]) -> Tuple[List[List[float]], List[str]
keys = list(desc[0].keys())
for idx, d in enumerate(desc):
for k in keys:
if d[k] == 'na':
if d[k] == 'na' or d[k] == r'na\r':
desc[idx][k] = 0.0
desc = [[float(d[k]) for k in keys] for d in desc]
return (desc, keys)
Expand All @@ -66,7 +66,7 @@ def _qspr_from_alvadesc_smifile(smiles_fn: str) -> Tuple[List[List[float]], List
keys = list(desc[0].keys())
for idx, d in enumerate(desc):
for k in keys:
if d[k] == 'na':
if d[k] == 'na' or d[k] == r'na\r':
desc[idx][k] = 0.0
desc = [[float(d[k]) for k in keys] for d in desc]
return (desc, keys)
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ filterwarnings = [

[project]
name = "ecnet"
version = "4.1.3"
version = "4.1.4"
authors = [
{ name="Travis Kessler", email="[email protected]" },
]
Expand Down

0 comments on commit 09b8eed

Please sign in to comment.