mirror of
https://github.com/explosion/spaCy.git
synced 2024-11-11 04:08:09 +03:00
06a1846379
* fix(util): fix decaying function output * fix(util): better test and adhere to code standards * fix(util): correct variable name, pytestify test, update website text
11 lines
244 B
Python
11 lines
244 B
Python
from spacy.util import decaying
|
|
|
|
def test_decaying():
|
|
sizes = decaying(10., 1., .5)
|
|
size = next(sizes)
|
|
assert size == 10.
|
|
size = next(sizes)
|
|
assert size == 10. - 0.5
|
|
size = next(sizes)
|
|
assert size == 10. - 0.5 - 0.5
|