Skip to content

Commit 6e47deb

Browse files
author
Beat Buesser
committed
Fix style checks
Signed-off-by: Beat Buesser <[email protected]>
1 parent 818947d commit 6e47deb

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

art/utils.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -546,10 +546,10 @@ def random_sphere(
546546
"The parameter `radius` of type `np.ndarray` is not supported to use with norm 1."
547547
)
548548

549-
u = np.random.uniform(size=(nb_points, nb_dims))
550-
v = np.sort(u)
551-
v_pre = np.concatenate((np.zeros((nb_points, 1)), v[:, :nb_dims-1]), axis=-1)
552-
x = v - v_pre
549+
var_u = np.random.uniform(size=(nb_points, nb_dims))
550+
var_v = np.sort(var_u)
551+
v_pre = np.concatenate((np.zeros((nb_points, 1)), var_v[:, : nb_dims - 1]), axis=-1)
552+
x = var_v - v_pre
553553
res = radius * x * np.random.choice([-1, 1], (nb_points, nb_dims))
554554

555555
elif norm == 2:

tests/test_utils.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,6 @@ def test_random_sphere(self):
179179
x = random_sphere(1, 10000, 1, np.inf)
180180
self.assertTrue(np.abs(np.max(np.abs(x), axis=1) - 1.0) < 1e-2)
181181

182-
183182
def test_to_categorical(self):
184183
y = np.array([3, 1, 4, 1, 5, 9])
185184
y_ = to_categorical(y)

0 commit comments

Comments
 (0)