From 8bf282a345ca80f9e6d154df3bc7ac7f12a6457d Mon Sep 17 00:00:00 2001 From: Peng Wang Date: Fri, 22 Jan 2021 16:23:32 -0800 Subject: [PATCH] Fixes tf.bool.as_numpy_dtype to return np.bool_ instead of np.bool (which is the same as Python `bool`). PiperOrigin-RevId: 353340422 Change-Id: Ie2a243a5ab2d1372308d63b0ec2c34b9c3f0084c --- tensorflow/python/framework/dtypes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tensorflow/python/framework/dtypes.py b/tensorflow/python/framework/dtypes.py index 51eca8edaa1..3f5b75daf68 100644 --- a/tensorflow/python/framework/dtypes.py +++ b/tensorflow/python/framework/dtypes.py @@ -518,7 +518,7 @@ _TF_TO_NP = { types_pb2.DT_INT64: np.int64, types_pb2.DT_BOOL: - np.bool, + np.bool_, types_pb2.DT_QINT8: _np_qint8, types_pb2.DT_QUINT8: