result = np.zeros(b.shape) # actually you can also use result = np.zeros_like(b) # but that also copies the dtype not only the shape