``z.reshape(res_shape)`` would be clearer