MCPcopy Create free account
hub / github.com/tensorflow/datasets / __add__

Method __add__

tensorflow_datasets/core/splits.py:659–665  ·  view source on GitHub ↗

Sum of 2 splits.

(self, other: str | AbstractSplit)

Source from the content-addressed store, hash-verified

657 raise NotImplementedError
658
659 def __add__(self, other: str | AbstractSplit) -> AbstractSplit:
660 """Sum of 2 splits."""
661 if not isinstance(other, (str, AbstractSplit)):
662 raise TypeError(f'Adding split {self!r} with non-split value: {other!r}')
663 if isinstance(other, str): # Normalize strings
664 other = AbstractSplit.from_spec(other)
665 return _SplitAdd(self, other)
666
667
668@dataclasses.dataclass(frozen=True)

Callers

nothing calls this directly

Calls 2

_SplitAddClass · 0.85
from_specMethod · 0.45

Tested by

no test coverage detected