From f494955f3d78f34c77ac1c4e6d15c9668fff3446 Mon Sep 17 00:00:00 2001 From: Matthias Diener Date: Thu, 18 Jul 2024 18:35:15 -0500 Subject: [PATCH] TypeInferenceMapper: allow np.bool in map_type_case --- loopy/type_inference.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/loopy/type_inference.py b/loopy/type_inference.py index b997cee25..26be6b352 100644 --- a/loopy/type_inference.py +++ b/loopy/type_inference.py @@ -396,7 +396,7 @@ def map_constant(self, expr): def map_type_cast(self, expr): subtype, = self.rec(expr.child) - if not issubclass(subtype.dtype.type, np.number): + if not issubclass(subtype.dtype.type, (np.number, np.bool_)): raise LoopyError(f"Can't cast a '{subtype}' to '{expr.type}'") return [expr.type]