List and For loop in Python
This blog also include some information of the array in Numpy.
Now have a list of [1,-1,1,1,1,-1]
, want to have another list of category corresponding to the 1
and -1
.
1 | >>> label=[1,-1,1,1,1,-1] |
set value using the filter character in array of numpy
1 | >>> import numpy as np |