You can use broadcasted NumPy comparison—
>>> A[np.arange(n)[:, None] < m] = 0
>>>
array([[0., 0., 0., 0., 0., 0., 0., 0.],
[1., 1., 1., 0., 0., 0., 0., 0.],
[1., 1., 1., 1., 1., 1., 0., 0.],
[1., 1., 1., 1., 1., 1., 1., 0.],
[1., 1., 1., 1., 1., 1., 1., 1.],
[1., 1., 1., 1., 1., 1., 1., 1.],
[1., 1., 1., 1., 1., 1., 1., 1.],
[1., 1., 1., 1., 1., 1., 1., 1.]])
Here, calling [:, None] augments the shape of np.arange(n) such that the comparison < is broadcasted across every element of m, for each item in the range. This generates a boolean mask of the same shape as A which is then used to set values to 0.
Note—If A is guaranteed to be an array of ones, I would recommend Divakar's solution, which is very similar to this.