Putting bool in arrays is asking for trouble. C++ wrestled with this problem for years (Boost banned vector<bool>)

I "like" this inconsistency between how core Python and Numpy assign a boolean value to a list containing one element equal zero:

Code: Select all`bool([0]) Out[94]: True bool(np.array([0])) Out[95]: False`

https://en.cppreference.com/w/cpp/container/vector_bool

This looks interesting

https://pypi.org/project/bitsets/