Delegate EagerTensor __bool__ behavior directly to numpy.
Numpy also casts non-bools to bool, so after this change EagerTensors that are not dtype bool can be converted to python bools. This also allows any shape EagerTensor with a single element to be converted to a python bool. PiperOrigin-RevId: 223409869
Loading
Please sign in to comment