Commit 7b2a4c5a authored by Tom Ward's avatar Tom Ward Committed by Copybara-Service
Browse files

Migrate from `collections.Iterable` to `collections.abc.Iterable`.

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
parent 253d1fea
...@@ -54,7 +54,7 @@ def mask_mean(mask, value, axis=None, drop_mask_channel=False, eps=1e-10): ...@@ -54,7 +54,7 @@ def mask_mean(mask, value, axis=None, drop_mask_channel=False, eps=1e-10):
axis = [axis] axis = [axis]
elif axis is None: elif axis is None:
axis = list(range(len(mask_shape))) 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"') 'axis needs to be either an iterable, integer or "None"')
broadcast_factor = 1. broadcast_factor = 1.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment