mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-06 18:49:26 +08:00
Enable ruff NPY002 rule (#11336)
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user