re = np.random.rand(*((3,) * dims)).astype(np_type) * 2 - 1