You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The interface is not optimal, because not all observations are indeed arrays. Observations can also be array-like only (numpy's ArrayLike type). In fact, this is the case for some of gymnasium's standard implementations (e.g. LazyFrames).
I am not sure how appropriate the current type annotation is (i.e. arr_type, which also includes Tensor).
Proposal:
Change type annotation of obs to numpy's ArrayLike
Add first line which ensures array representation: obs = np.array(obs). This will convert anything array-like to an actual array (e.g. using an implementation of __array__ if necessary).
The text was updated successfully, but these errors were encountered:
The interface is not optimal, because not all observations are indeed arrays. Observations can also be array-like only (numpy's
ArrayLike
type). In fact, this is the case for some of gymnasium's standard implementations (e.g.LazyFrames
).I am not sure how appropriate the current type annotation is (i.e.
arr_type
, which also includesTensor
).Proposal:
obs
to numpy'sArrayLike
obs = np.array(obs)
. This will convert anything array-like to an actual array (e.g. using an implementation of__array__
if necessary).The text was updated successfully, but these errors were encountered: