datamllab / rlcard

Reinforcement Learning / AI Bots in Card (Poker) Games - Blackjack, Leduc, Texas, DouDizhu, Mahjong, UNO.
http://www.rlcard.org
MIT License
2.86k stars 618 forks source link

np.int is deprecated #266

Open pseudo-rnd-thoughts opened 2 years ago

pseudo-rnd-thoughts commented 2 years ago

Im part of the dev team on PettingZoo. We were through our CI trying to reduce the number of warnings and spotted this warning

test/pytest_runner_test.py: 99 warnings
test/unwrapped_test.py: 6 warnings
  /opt/hostedtoolcache/Python/3.7.13/x64/lib/python3.7/site-packages/rlcard/games/doudizhu/game.py:40: DeprecationWarning: `np.int` is a deprecated alias for the builtin `int`. To silence this warning, use `int` by itself. Doing this will not modify any behavior and is safe. When replacing `np.int`, you may wish to use e.g. `np.int64` or `np.int32` to specify the precision. If you wish to review your current use, check the release note link for additional information.
  Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
    for _ in range(self.num_players)]

Would you be able to fix the warning line, thanks

daochenzha commented 2 years ago

@pseudo-rnd-thoughts Thank you. Just fixed this. PyPi will be updated as well next week.

GaetanLepage commented 4 months ago

@pseudo-rnd-thoughts Thank you. Just fixed this. PyPi will be updated as well next week.

Hi. It seems that the latest release (1.0.7) does not contain this fix.