Skip to content

Commit

Permalink
Migrate from collections.Iterable to collections.abc.Iterable.
Browse files Browse the repository at this point in the history
Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3, and in 3.10 it will stop working.

PiperOrigin-RevId: 454823734
Change-Id: Ic1d22c0badd76c41693967f785f8861746657731
  • Loading branch information
dogrecajb authored and copybara-github committed Jun 14, 2022
1 parent 36ff4d2 commit 1744087
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion alphafold/model/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def mask_mean(mask, value, axis=None, drop_mask_channel=False, eps=1e-10):
axis = [axis]
elif axis is None:
axis = list(range(len(mask_shape)))
assert isinstance(axis, collections.Iterable), (
assert isinstance(axis, collections.abc.Iterable), (
'axis needs to be either an iterable, integer or "None"')

broadcast_factor = 1.
Expand Down

0 comments on commit 1744087

Please sign in to comment.