Commit 29574450 authored by Akshay Modi's avatar Akshay Modi Committed by TensorFlower Gardener
Browse files

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
parent 5e609231
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment