Skip to content

Commit

Permalink
Make this code compatible with Python 3.10.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 473345210
  • Loading branch information
yilei authored and copybara-github committed Sep 9, 2022
1 parent 78d2b6e commit 050e0b6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions trax/tf_numpy/numpy_impl/tests/arrays_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# limitations under the License.

"""Tests for ndarray."""
import collections
from collections import abc

import numpy as np
import tensorflow.compat.v2 as tf
Expand Down Expand Up @@ -170,7 +170,7 @@ def testBool(self):

def testHash(self):
a = t2a(tf.convert_to_tensor(value=10))
self.assertNotIsInstance(a, collections.Hashable)
self.assertNotIsInstance(a, abc.Hashable)
with self.assertRaisesWithPredicateMatch(
TypeError, r'unhashable type'):
hash(a)
Expand Down

0 comments on commit 050e0b6

Please sign in to comment.