From f61e1203bdc86fe91603b418532eb3ff927529f9 Mon Sep 17 00:00:00 2001 From: Peter Hawkins Date: Wed, 30 Sep 2020 09:10:26 -0700 Subject: [PATCH] [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 --- tensorflow/compiler/xla/python/xla_client.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tensorflow/compiler/xla/python/xla_client.py b/tensorflow/compiler/xla/python/xla_client.py index d65e0152f67..133483d2bb9 100644 --- a/tensorflow/compiler/xla/python/xla_client.py +++ b/tensorflow/compiler/xla/python/xla_client.py @@ -193,8 +193,8 @@ XLA_ELEMENT_TYPE_TO_DTYPE = { 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