Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

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]
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #invert #true #false #array #python
ADD COMMENT
Topic
Name
4+3 =