From 5490a6d4fbb997b95bdccb2e41c37c641667201e Mon Sep 17 00:00:00 2001 From: Roman Bredehoft Date: Fri, 28 Jul 2023 15:14:59 +0200 Subject: [PATCH] Fix invalid escape sequence '\s' in Dataset docstring --- skorch/dataset.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/skorch/dataset.py b/skorch/dataset.py index 5a561276e..ef587050c 100644 --- a/skorch/dataset.py +++ b/skorch/dataset.py @@ -105,7 +105,6 @@ def unpack_data(data): class Dataset(torch.utils.data.Dataset): - # pylint: disable=anomalous-backslash-in-string """General dataset wrapper that can be used in conjunction with PyTorch :class:`~torch.utils.data.DataLoader`. @@ -114,12 +113,12 @@ class Dataset(torch.utils.data.Dataset): However, the target is allowed to be ``None``. In that case, :class:`.Dataset` will currently return a dummy tensor, since :class:`~torch.utils.data.DataLoader` does not work with - ``None``\s. + ``None``\\s. :class:`.Dataset` currently works with the following data types: - * numpy ``array``\s - * PyTorch :class:`~torch.Tensor`\s + * numpy ``array``\\s + * PyTorch :class:`~torch.Tensor`\\s * scipy sparse CSR matrices * pandas NDFrame * a dictionary of the former three @@ -168,10 +167,9 @@ def __len__(self): return self._len def transform(self, X, y): - # pylint: disable=anomalous-backslash-in-string """Additional transformations on ``X`` and ``y``. - By default, they are cast to PyTorch :class:`~torch.Tensor`\s. + By default, they are cast to PyTorch :class:`~torch.Tensor`\\s. Override this if you want a different behavior. Note: If you use this in conjuction with PyTorch