I am trying to rewrite a matlab code in python27. There is a matlab line as follows:
vector_C = vector_A > vector_B;
If I try to write this
You can force numpy to store the elements as integers. It treats 0 as false and 1 as true.
import numpy vector_C = numpy.array( vector_A > vector_B, dtype=int) ;