diff --git a/datascience/util.py b/datascience/util.py index b1289972..990e447e 100644 --- a/datascience/util.py +++ b/datascience/util.py @@ -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 \ No newline at end of file diff --git a/tests/test_util.py b/tests/test_util.py index f68ad617..b5d0f08e 100644 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -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)))