From a7cb8de0d7b39b8af0f1525d69a47916ee941da5 Mon Sep 17 00:00:00 2001 From: Edward <43848523+thomashacker@users.noreply.github.com> Date: Mon, 18 Oct 2021 09:10:45 +0200 Subject: [PATCH] Fix assertion error in staticvectors (#9481) * Fix assertion error in staticvectors * Update spacy/ml/staticvectors.py * Update spacy/ml/staticvectors.py Co-authored-by: Ines Montani Co-authored-by: Sofie Van Landeghem Co-authored-by: Ines Montani --- spacy/ml/staticvectors.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/spacy/ml/staticvectors.py b/spacy/ml/staticvectors.py index bc0189873..53ef01906 100644 --- a/spacy/ml/staticvectors.py +++ b/spacy/ml/staticvectors.py @@ -101,6 +101,5 @@ def _handle_empty(ops: Ops, nO: int): def _get_drop_mask(ops: Ops, nO: int, rate: Optional[float]) -> Optional[Floats1d]: if rate is not None: mask = ops.get_dropout_mask((nO,), rate) - assert isinstance(mask, Floats1d) - return mask + return mask # type: ignore return None