Skip to content

Commit

Permalink
Merge pull request #232 from yoshida-lab/ngram_tab_bug
Browse files Browse the repository at this point in the history
Update modifier.py
  • Loading branch information
stewu5 committed Mar 5, 2021
2 parents 8f9ac53 + c368142 commit d504a1f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions tests/inverse/test_iqspr.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,10 @@ def test_gaussian_ll_4(data):
bre.fit(train_data['x'], train_data[['a', 'b']])


@pytest.mark.skip(
reason=
"Sklean.BassClass requires all params passed to __ini__ can be accessed by attribute/property on Python 3.8"
)
# @pytest.mark.skip(
# reason=
# "Sklean.BassClass requires all params passed to __ini__ can be accessed by attribute/property on Python 3.8"
# )
def test_ngram_1(data):
ngram = NGram()
assert ngram.ngram_table is None
Expand Down
10 changes: 5 additions & 5 deletions xenonpy/inverse/iqspr/modifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class NGram(BaseProposal):

def __init__(self,
*,
ngram_tab=None,
ngram_table=None,
sample_order=(1, 10),
del_range=(1, 10),
min_len=1,
Expand All @@ -58,7 +58,7 @@ def __init__(self,
Parameters
----------
ngram_tab: NGram table
ngram_table: NGram table
NGram table for modify SMILES.
sample_order: tuple[int, int] or int
range of order of ngram table used during proposal,
Expand All @@ -81,12 +81,12 @@ def __init__(self,
self.max_len = max_len
self.del_range = del_range

if ngram_tab is None:
if ngram_table is None:
self._table = None
self._train_order = None
else:
self._table = deepcopy(ngram_tab)
self._train_order = (1, len(ngram_tab))
self._table = deepcopy(ngram_table)
self._train_order = (1, len(ngram_table))

self._fit_sample_order()
self._fit_min_len()
Expand Down

0 comments on commit d504a1f

Please sign in to comment.