Skip to content

Commit

Permalink
add underscore
Browse files Browse the repository at this point in the history
  • Loading branch information
Hakuyume committed May 24, 2019
1 parent 393b897 commit d8ffa63
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions chainer/dataset/tabular/__init__.py
@@ -1,2 +1,2 @@
from chainer.dataset.tabular import as_mode # NOQA
from chainer.dataset.tabular import slice # NOQA
from chainer.dataset.tabular import _as_mode # NOQA
from chainer.dataset.tabular import _slice # NOQA
@@ -1,7 +1,7 @@
from chainer.dataset.tabular import tabular_dataset


class AsTuple(tabular_dataset.TabularDataset):
class _AsTuple(tabular_dataset.TabularDataset):

def __init__(self, dataset):
self._dataset = dataset
Expand All @@ -21,7 +21,7 @@ def get_examples(self, indices, key_indices):
return self._dataset.get_examples(indices, key_indices)


class AsDict(tabular_dataset.TabularDataset):
class _AsDict(tabular_dataset.TabularDataset):

def __init__(self, dataset):
self._dataset = dataset
Expand Down
Expand Up @@ -6,7 +6,7 @@
from chainer.dataset.tabular import tabular_dataset


class Slice(tabular_dataset.TabularDataset):
class _Slice(tabular_dataset.TabularDataset):

def __init__(self, dataset, indices, keys):
self._dataset = dataset
Expand Down Expand Up @@ -41,7 +41,7 @@ def get_examples(self, indices, key_indices):
return self._dataset.get_examples(indices, key_indices)


class SliceHelper(object):
class _SliceHelper(object):

def __init__(self, dataset):
self._dataset = dataset
Expand All @@ -53,7 +53,7 @@ def __getitem__(self, args):
indices = args
keys = None

return Slice(self._dataset, indices, keys)
return _Slice(self._dataset, indices, keys)


def _as_indices(indices, len_):
Expand Down
6 changes: 3 additions & 3 deletions chainer/dataset/tabular/tabular_dataset.py
Expand Up @@ -120,7 +120,7 @@ def slice(self):
Returns:
A view of specifed range.
"""
return chainer.dataset.tabular.slice.SliceHelper(self)
return chainer.dataset.tabular._slice._SliceHelper(self)

def fetch(self):
"""Fetch data.
Expand Down Expand Up @@ -148,15 +148,15 @@ def as_tuple(self):
Returns:
A view whose :attr:`mode` is :class:`tuple`.
"""
return chainer.dataset.tabular.as_mode.AsTuple(self)
return chainer.dataset.tabular._as_mode._AsTuple(self)

def as_dict(self):
"""Return a view with dict mode.
Returns:
A view whose :attr:`mode` is :class:`dict`.
"""
return chainer.dataset.tabular.as_mode.AsDict(self)
return chainer.dataset.tabular._as_mode._AsDict(self)

def get_example(self, i):
example = self.get_examples([i], None)
Expand Down

0 comments on commit d8ffa63

Please sign in to comment.