Skip to content
Commit 58c8b253 authored by Prashant Kumar's avatar Prashant Kumar
Browse files

Replacing `is` with `==` for the dtype check.

>>> a = np.ndarray([1,1]).astype(np.half)
>>> a
array([[0.007812]], dtype=float16)
>>> a.dtype
dtype('float16')
>>> a.dtype == np.half
True
>>> a.dtype == np.float16
True
>>> a.dtype is np.float16
False

Checking with `is` leads to inconsistency in checking.

Reviewed By: silvas

Differential Revision: https://reviews.llvm.org/D139121
parent 0fb74d0f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment