M = np.arange(1500 * 2000).reshape(1500, 2000)
z = np.zeros(700)
_, M_broadcast = np.broadcast_arrays(z[:, (None), (None)], M[(None), ...])
print(M_broadcast.shape, M_broadcast.flags.owndata)
python - repeating numpy array without replicating data