instadeepai / jumanji

🕹️ A diverse suite of scalable reinforcement learning environments in JAX
https://instadeepai.github.io/jumanji
Apache License 2.0
583 stars 70 forks source link

chore: fix matplotlib and jax typing issues #216

Closed sash-a closed 8 months ago

sash-a commented 8 months ago

Changes

Fixed mypy issues blocking pre-commit on python 3.9


Jax typing issue

I anyone wants to try solve the jax issue instead of adding a type ignore:

The mypy error: jumanji/types.py:236: error: Returning Any from function declared to return "dtype[Any]" [no-any-return]

Seems like it thinks jnp.empty((), dtype).dtype returns Any, probably because jnp.empty(...) also returns Any, not really sure of a way around this :shrug:.