A = np.array([[0.94366988, 0.86095311, 0.88896715, 0.93630641, 0.74075403, 0.52849619
, 0.03094677, 0.85707681, 0.88457925, 0.67279696, 0.26601085,
Standard numpy broadcasting can be used to compare each element with a scalar value, yielding a Boolean for each element. The ndarray.astype method then converts the True values to 1 and the False values to zero.
In [16]: (A > 0.5).astype(int)
Out[16]:
array([[1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0,
0, 1, 1, 1, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0,
1, 0, 0, 1, 1, 0]])