From 35db002f883777873f8d1768ea7163796a773da8 Mon Sep 17 00:00:00 2001 From: pseudo-rnd-thoughts Date: Sat, 12 Oct 2024 15:56:11 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20Farama-F?= =?UTF-8?q?oundation/Gymnasium@d571ed63017fb0bf1a9022960a3798b8d7c8b409=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main/.buildinfo | 2 +- .../tutorials_python.zip | Bin 106130 -> 106130 bytes .../tutorials_jupyter.zip | Bin 128773 -> 128773 bytes .../wrappers/numpy_to_torch/index.html | 18 +++++++++--------- main/api/wrappers/misc_wrappers/index.html | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/main/.buildinfo b/main/.buildinfo index d74a4c420..bd917ac8d 100644 --- a/main/.buildinfo +++ b/main/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: f1b0e61f71c829ea379aa85a1bed8bf6 +config: 08e0168e0cb3d9e88a33479fd0227a03 tags: d77d1c0d9ca2f4c8421862c7c5a0d620 diff --git a/main/_downloads/315c4c52fb68082a731b192d944e2ede/tutorials_python.zip b/main/_downloads/315c4c52fb68082a731b192d944e2ede/tutorials_python.zip index db68fed554768d1df32fa834ed019f991a2edefc..1d64782881c0074d36a8a2ba046a1c2667d1add9 100644 GIT binary patch delta 143 zcmbQVmu=EsHr@blW)=|!5SUiyvynF;of$}PE=bQ405cwz2SkDyCKu00fEmoMzFUD9 z+yAOCspE5 z?SEAmRouWVm25_KLlA4a-W!QOZClV3;;78&SmrkGYsc3CISGr C@-AQi diff --git a/main/_downloads/a5659940aa3f8f568547d47752a43172/tutorials_jupyter.zip b/main/_downloads/a5659940aa3f8f568547d47752a43172/tutorials_jupyter.zip index 7b0be7d033370401a4a7161b628fff537be01317..ee8a853cf5a4c4163205d53148dbb1bd9b928f44 100644 GIT binary patch delta 144 zcmZpD$KLvmoj1UnnMH&F1m4&AY~(#!%?zYBU#$)h1~WAJnbW`wy{|XrK#c8NB8<}B zV3tNa)9^G#g-t}^qwz_VPM8n7{l%>RAl;B#yGIlkFSiuV20l}#sDy5;Wx$< E07W7_H2?qr delta 144 zcmZpD$KLvmoj1UnnMH&F1ZrBmH}W2>W(LxmuT}>LgBcqA%xPeT-q)LQAjWns5k_fm zFiRtzad$MB^=ud8VoMNfde0ZeFfijOjA8c`Dl+{mV;orO$5+N+FvIT~V*r@3@EcSource code for gymnasium.wrappers.numpy_to_torch
@torch_to_numpy.register(numbers.Number) def _number_to_numpy(value: numbers.Number) -> Any: - """Convert a python number (int, float, complex) to a numpy array.""" + """Convert a python number (int, float, complex) to a NumPy array.""" return np.array(value) @torch_to_numpy.register(torch.Tensor) def _torch_to_numpy(value: torch.Tensor) -> Any: - """Convert a torch.Tensor to a numpy array.""" + """Convert a torch.Tensor to a NumPy array.""" return value.numpy(force=True) @torch_to_numpy.register(abc.Mapping) def _mapping_torch_to_numpy(value: Mapping[str, Any]) -> Mapping[str, Any]: - """Converts a mapping of PyTorch Tensors into a Dictionary of Jax Array.""" + """Converts a mapping of PyTorch Tensors into a Dictionary of NumPy Array.""" return type(value)(**{k: torch_to_numpy(v) for k, v in value.items()}) @torch_to_numpy.register(abc.Iterable) def _iterable_torch_to_numpy(value: Iterable[Any]) -> Iterable[Any]: - """Converts an Iterable from PyTorch Tensors to an iterable of Jax Array.""" + """Converts an Iterable from PyTorch Tensors to an iterable of NumPy Array.""" if hasattr(value, "_make"): # namedtuple - underline used to prevent potential name conflicts # noinspection PyProtectedMember @@ -432,7 +432,7 @@

Source code for gymnasium.wrappers.numpy_to_torch

@functools.singledispatch def numpy_to_torch(value: Any, device: Device | None = None) -> Any: - """Converts a Jax Array into a PyTorch Tensor.""" + """Converts a NumPy Array into a PyTorch Tensor.""" raise Exception( f"No known conversion for NumPy type ({type(value)}) to PyTorch registered. Report as issue on github." ) @@ -441,7 +441,7 @@

Source code for gymnasium.wrappers.numpy_to_torch

@numpy_to_torch.register(numbers.Number) @numpy_to_torch.register(np.ndarray) def _numpy_to_torch(value: np.ndarray, device: Device | None = None) -> torch.Tensor: - """Converts a Jax Array into a PyTorch Tensor.""" + """Converts a NumPy Array into a PyTorch Tensor.""" assert torch is not None tensor = torch.tensor(value) if device: @@ -453,7 +453,7 @@

Source code for gymnasium.wrappers.numpy_to_torch

def _numpy_mapping_to_torch( value: Mapping[str, Any], device: Device | None = None ) -> Mapping[str, Any]: - """Converts a mapping of Jax Array into a Dictionary of PyTorch Tensors.""" + """Converts a mapping of NumPy Array into a Dictionary of PyTorch Tensors.""" return type(value)(**{k: numpy_to_torch(v, device) for k, v in value.items()}) @@ -461,7 +461,7 @@

Source code for gymnasium.wrappers.numpy_to_torch