Skip to content

Commit a269ce3

Browse files
authored
python3Packages.rlcard: fix build (#417828)
2 parents f9ec091 + 2c04edb commit a269ce3

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

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

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

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

0 commit comments

Comments
 (0)