Skip to content

Commit

Permalink
Fix invalid escape sequence '\s' in Dataset docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
RomanBredehoft committed Feb 8, 2024
1 parent 0d3a8ec commit 5490a6d
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions skorch/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 5490a6d

Please sign in to comment.