MCPcopy
hub / github.com/tinygrad/tinygrad / is_bool

Method is_bool

tinygrad/dtype.py:160–160  ·  view source on GitHub ↗
(x: DType)

Source from the content-addressed store, hash-verified

158 def is_unsigned(x: DType) -> bool: return x.scalar() in dtypes.uints
159 @staticmethod
160 def is_bool(x: DType) -> bool: return x.scalar() == dtypes.bool
161 @staticmethod
162 def from_py(x) -> DType:
163 # NOTE: isinstance(True, int) is True, so bool must be checked before int

Callers 5

constMethod · 0.80
masked_selectMethod · 0.80
render_vector_prefixMethod · 0.80
lcastFunction · 0.80
_check_dtypeMethod · 0.80

Calls 1

scalarMethod · 0.80

Tested by

no test coverage detected