commit | f61e1203bdc86fe91603b418532eb3ff927529f9 | [log] [tgz] |
---|---|---|
author | Peter Hawkins <phawkins@google.com> | Wed Sep 30 09:10:26 2020 -0700 |
committer | TensorFlower Gardener <gardener@tensorflow.org> | Wed Sep 30 09:19:02 2020 -0700 |
tree | 0cbd99a84e6d7c4eddfd9a67d1f4f3f8b55262f2 | |
parent | fa75523767ed786e44aa5498c94fbe15834aad9d [diff] |
[XLA:Python] Fix Numpy deprecation warning for use of np.object. Will fix https://github.com/google/jax/issues/4424 when included in a jaxlib. PiperOrigin-RevId: 334611917 Change-Id: I9dc76f812d4744567b62d4b5cf385ded375c4986
diff --git a/tensorflow/compiler/xla/python/xla_client.py b/tensorflow/compiler/xla/python/xla_client.py index d65e015..133483d 100644 --- a/tensorflow/compiler/xla/python/xla_client.py +++ b/tensorflow/compiler/xla/python/xla_client.py
@@ -193,8 +193,8 @@ PrimitiveType.F64: np.dtype('float64'), PrimitiveType.C64: np.dtype('complex64'), PrimitiveType.C128: np.dtype('complex128'), - PrimitiveType.TUPLE: np.dtype(np.object), - PrimitiveType.TOKEN: np.dtype(np.object), + PrimitiveType.TUPLE: np.dtype(np.object_), + PrimitiveType.TOKEN: np.dtype(np.object_), } # Note the conversion on the key. Numpy has a known issue wherein dtype hashing