Skip to content

Commit

Permalink
Fix warning with numpy 17.x+ (#2482)
Browse files Browse the repository at this point in the history
This commit integrates upstream changes into TensorBoard’s
`tensorflow_stub` to resolve a deprecation warning in recent release
candidates for NumPy.

Upstream bug: <tensorflow/tensorflow#30427>

Upstream fix: <tensorflow/tensorflow#30559>
  • Loading branch information
habernal authored and wchargin committed Jul 31, 2019
1 parent c1c2771 commit d39ce97
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tensorboard/compat/tensorflow_stub/dtypes.py
Expand Up @@ -538,16 +538,16 @@ def size(self):
# quantized types.
# TODO(mrry,keveman): Investigate Numpy type registration to replace this
# hard-coding of names.
_np_qint8 = np.dtype([("qint8", np.int8, 1)])
_np_quint8 = np.dtype([("quint8", np.uint8, 1)])
_np_qint16 = np.dtype([("qint16", np.int16, 1)])
_np_quint16 = np.dtype([("quint16", np.uint16, 1)])
_np_qint32 = np.dtype([("qint32", np.int32, 1)])
_np_qint8 = np.dtype([("qint8", np.int8)])
_np_quint8 = np.dtype([("quint8", np.uint8)])
_np_qint16 = np.dtype([("qint16", np.int16)])
_np_quint16 = np.dtype([("quint16", np.uint16)])
_np_qint32 = np.dtype([("qint32", np.int32)])

# _np_bfloat16 is defined by a module import.

# Custom struct dtype for directly-fed ResourceHandles of supported type(s).
np_resource = np.dtype([("resource", np.ubyte, 1)])
np_resource = np.dtype([("resource", np.ubyte)])

# Standard mappings between types_pb2.DataType values and numpy.dtypes.
_NP_TO_TF = frozenset(
Expand Down

0 comments on commit d39ce97

Please sign in to comment.