You can simply do something like:
row_idx = np.arange(rows)[:, None]
col_idx = np.arange(cols)
binary_img = (row_idx - m * col_idx) > c
This will get you close to what you want, though depending on how you define the axes for your line equation, you may need to flip the result upside down.