From a92e4457a8c3f2e6bd3fa0d1f464b77fb99e2b1f Mon Sep 17 00:00:00 2001 From: Alexandru Fikl Date: Sun, 30 Jul 2023 17:25:02 +0300 Subject: [PATCH] fix type comparison --- pyopencl/tools.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyopencl/tools.py b/pyopencl/tools.py index c4c2ace6a..356dcc592 100644 --- a/pyopencl/tools.py +++ b/pyopencl/tools.py @@ -757,7 +757,7 @@ def __repr__(self) -> str: self.dtype) def __eq__(self, other: Any) -> bool: - return (type(self) == type(other) + return (type(self) is type(other) and self.dtype == other.dtype and self.name == other.name) @@ -812,7 +812,7 @@ def declarator(self) -> str: return self.decl def __eq__(self, other) -> bool: - return (type(self) == type(other) + return (type(self) is type(other) and self.decl == other.decl and self.name == other.name)