Skip to content
This repository has been archived by the owner on Sep 11, 2023. It is now read-only.

Commit

Permalink
Update types.py (#1503)
Browse files Browse the repository at this point in the history
* Update types.py

import Iterable from collections.abc

* add name to authors and add changelog entry
  • Loading branch information
sroet authored Jul 20, 2021
1 parent d6eba9d commit 9739284
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions doc/source/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ Changelog
- serialization: fixed bug in function which checked for h5 serialization options.
- :code:`n_jobs` is handled consistently, allows only for :code:`None` or positive integers and when
determined from hardware, falls back to logical number of cpus. :pr:`1488`
- import from :code:`collections.abc` instead of base :code:`collections`
:pr:`1503`
- Use :code:`int` instead of :code:`numpy.int` to solve :code:`numpy` 1.20
DeprecationWarning :pr:`1504`

Expand Down
2 changes: 1 addition & 1 deletion pyemma/util/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def is_string(s):
return isinstance(s, str)

def is_iterable(I):
return isinstance(I, collections.Iterable)
return isinstance(I, collections.abc.Iterable)

def is_list(S):
# FIXME: name states check for list, but checks for tuple __and__ list. Thats confusing.
Expand Down

0 comments on commit 9739284

Please sign in to comment.