Fixes malformatted error string in dtypes.cc
Before >tf.DType(0) *** TypeError: %d does not correspond to a valid tensorflow::DataType After >tf.DType(0) *** TypeError: 0 does not correspond to a valid tensorflow::DataType PiperOrigin-RevId: 340888529 Change-Id: I9c46f9fda798853ed9e9ff3b8c0d7296e896a675
This commit is contained in:
parent
328a2bdc8b
commit
6c0f333a16
@ -68,7 +68,7 @@ PYBIND11_MODULE(_dtypes, m) {
|
|||||||
return static_cast<tensorflow::DataType>(id);
|
return static_cast<tensorflow::DataType>(id);
|
||||||
}
|
}
|
||||||
throw py::type_error(
|
throw py::type_error(
|
||||||
py::str("%d does not correspond to a valid tensorflow::DataType")
|
py::str("{} does not correspond to a valid tensorflow::DataType")
|
||||||
.format(id));
|
.format(id));
|
||||||
}))
|
}))
|
||||||
// For compatibility with pure-Python DType.
|
// For compatibility with pure-Python DType.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user