Closed timokau closed 2 years ago
Hey Timo, good catch, this change makes sense, we should be using isinstance
over type(x) == ...
wherever possible. We're in the process of figuring out how to handle incoming PRs (we have an internal repo that they need to get synced back to), and we'll try to merge this soon - thanks!
Closing since this is already included in e363d6ba923025a60c79b396293a22d52c4d83a7.
This would previously break the DictObsActionWrapper when using it with an environment that does not natively come with dictionary observations.
Since the type of
observation
would typically bynumpy.ndarray
, which is not equal tonptyping.NDArray
, the assertion would fail. What we actually want to check here is thatobservation
has an interface that is compatible withnptyping.NDArray
though.