Skip to content

Commit

Permalink
Add docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
kmkurn committed May 16, 2020
1 parent 19b250d commit 6a87fb3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions text2array/vocab.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,13 @@ def extend(
samples: Iterable[Sample],
fields: Optional[Iterable[FieldName]] = None,
) -> None:
"""Extend vocabulary with field values in samples.
Args:
samples (~typing.Iterable[Sample]): Samples to extend the vocabulary with.
fields: Extend only these field names. Defaults to all field names in the
vocabulary.
"""
if fields is None:
fields = self.keys()

Expand Down

0 comments on commit 6a87fb3

Please sign in to comment.