From 7a0a32ba41c9cca2d0ea133e706d7322724860d1 Mon Sep 17 00:00:00 2001 From: YunDanTianChang <2472041823@qq.com> Date: Sun, 7 Apr 2024 09:14:01 +0800 Subject: [PATCH] Fix ArrayEditor support for Bool value --- traitsui/editors/array_editor.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/traitsui/editors/array_editor.py b/traitsui/editors/array_editor.py index cecc680b8..e99002149 100644 --- a/traitsui/editors/array_editor.py +++ b/traitsui/editors/array_editor.py @@ -72,6 +72,9 @@ def __init__(self, editor): if object.dtype.kind == "i": trait = Int() + if object.dtype.kind == "b": + trait = Bool() + if len(object.shape) == 1: self.view = self._one_dim_view(object, style, width, trait) elif len(object.shape) == 2: