Mark Dickinson <dicki...@gmail.com> added the comment: > - register numpy bool ('np.bool_') as a virtual subclass of 'Boolean' only
Be aware that np.bool_ behaves differently from Python's bool type in a number of ways. It may not make sense to have something that tries to abstract over both bool and np.bool_. >>> import numpy as np >>> np.bool_(True) + np.bool_(True) True >>> ~np.bool_(True) False >>> True + True 2 >>> ~True -2 ---------- nosy: +mark.dickinson _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue32886> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com