Skip to content

Commit 64d05dd

Browse files
committed
python3Packages.rlcard: fix build
1 parent a12d940 commit 64d05dd

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

pkgs/development/python-modules/rlcard/default.nix

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,15 @@ buildPythonPackage rec {
3434
})
3535
];
3636

37+
# AttributeError: 'numpy.ndarray' object has no attribute 'tostring'
38+
# tobytes() has the exact same behavior as tostring()
39+
postPatch = ''
40+
substituteInPlace rlcard/agents/cfr_agent.py \
41+
--replace-fail \
42+
"state['obs'].tostring()" \
43+
"state['obs'].tobytes()"
44+
'';
45+
3746
build-system = [
3847
setuptools
3948
wheel

0 commit comments

Comments
 (0)