/net/wpa_supplicant_gui/files/

href='https://git.le-fay.org/freebsd/ports' title='freebsd/ports Git repository'/>
aboutsummaryrefslogtreecommitdiffstats
path: root/science/linux-ai-ml-env/files/patch-reinforcement__learning_reinforce.py
blob: 9f1ab154093183ae93c4b90deed1ecb3d6a9c3bf (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
--- reinforcement_learning/reinforce.py.orig	2025-02-09 16:56:58 UTC
+++ reinforcement_learning/reinforce.py
@@ -9,6 +9,9 @@ from torch.distributions import Categorical
 import torch.optim as optim
 from torch.distributions import Categorical
 
+# numpy.bool8 is deprecated since version 1.24.0
+if not hasattr(np, 'bool8'):
+    np.bool8 = np.bool_
 
 parser = argparse.ArgumentParser(description='PyTorch REINFORCE example')
 parser.add_argument('--gamma', type=float, default=0.99, metavar='G',