Enable ruff NPY002 rule (#11336)

This commit is contained in:
Maxim Smolskiy
2024-04-01 22:39:31 +03:00
committed by GitHub
parent 39daaf8248
commit f8a948914b
9 changed files with 32 additions and 25 deletions

View File

@ -289,12 +289,13 @@ class SmoSVM:
if cmd is None:
return
for i2 in np.roll(self.unbound, np.random.choice(self.length)):
rng = np.random.default_rng()
for i2 in np.roll(self.unbound, rng.choice(self.length)):
cmd = yield i1, i2
if cmd is None:
return
for i2 in np.roll(self._all_samples, np.random.choice(self.length)):
for i2 in np.roll(self._all_samples, rng.choice(self.length)):
cmd = yield i1, i2
if cmd is None:
return