def __init__(self, input=None, target=None,
                 train=None, valid=None, test=None,
                 limit=None):
        super(Dataset, self).__init__()

        self._limit = limit
        self._train = Subset()
        self._valid = Subset()
        self._test = Subset()

        if input is not None and target is not None:
            self._input = input
            self._target = target
        elif train is not None and valid is not None and test is not None:
            self._input = _combine(train.input, valid.input, test.input)
            self._target = _combine(train.target, valid.target, test.target)

            if isinstance(train.input, list):
                self._train.input = \
                    [HierarData(X, limit=self._limit) for X in train.input]
                self._valid.input = \
                    [HierarData(X, limit=self._limit) for X in valid.input]
                self._test.input = \
                    [HierarData(X, limit=self._limit) for X in test.input]
            else:
                self._train.input = HierarData(train.input, limit=self._limit)
                self._valid.input = HierarData(valid.input, limit=self._limit)
                self._test.input = HierarData(test.input, limit=self._limit)

            if isinstance(train.target, list):
                self._train.target = \
                    [HierarData(X, limit=self._limit) for X in train.target]
                self._valid.target = \
                    [HierarData(X, limit=self._limit) for X in valid.target]
                self._test.target = \
                    [HierarData(X, limit=self._limit) for X in test.target]
            else:
                self._train.target = HierarData(
                    train.target, limit=self._limit)
                self._valid.target = HierarData(
                    valid.target, limit=self._limit)
                self._test.target = HierarData(test.target, limit=self._limit)

            n_train = _get_n(train.input)
            n_valid = _get_n(valid.input)
            n_test = _get_n(test.input)

            self._train_ind = np.arange(n_train)
            self._valid_ind = np.arange(n_train, n_train + n_valid)
            self._test_ind = np.arange(n_train + n_valid,
                                       n_train + n_valid + n_test)
        else:
            raise ValueError("Invalid combination of arguments")
dataset/ETHPy150Open Cysu/dlearn/dlearn/data/dataset.py/Dataset.__init__/original