Skip to content

Commit

Permalink
Merge pull request #585 from data-8/ahemani/issue_584
Browse files Browse the repository at this point in the history
Issue 584: Remove redundant Sequence Check
  • Loading branch information
davidwagner committed Apr 5, 2023
2 parents dec4d84 + 50a794c commit cc242fd
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions datascience/util.py
Expand Up @@ -254,6 +254,4 @@ def is_non_string_iterable(value):
return False
if hasattr(value, '__iter__'):
return True
if isinstance(value, collections.abc.Sequence):
return True
return False
2 changes: 1 addition & 1 deletion tests/test_util.py
Expand Up @@ -72,7 +72,7 @@ def test_minimize():


def test_minimize_smooth():
assert _round_eq(2, ds.minimize(lambda x: (x-2)**2, smooth=True))
assert _round_eq(2, ds.minimize(lambda x: (x-2)**2, smooth=True, log=print))
assert _round_eq([2, 1], list(ds.minimize(lambda x, y: (x-2)**2 + (y-1)**2, smooth=True)))
assert _round_eq(2, ds.minimize(lambda x: (x-2)**2, 1, smooth=True))
assert _round_eq([2, 1], list(ds.minimize(lambda x, y: (x-2)**2 + (y-1)**2, [1, 1], smooth=True)))
Expand Down

0 comments on commit cc242fd

Please sign in to comment.