Answers for "how to invert a true false array in python"

0

how to invert a true false array in python

>>> import numpy
>>> mylist = [True, True, False]
>>> ~numpy.array(mylist)
array([False, False, True], dtype=bool)
>>> list(~numpy.array(mylist))
[False, False, True]
Posted by: Guest on August-04-2020

Python Answers by Framework

Browse Popular Code Answers by Language