From 11ed02534f84bc90ba3aa74a0786f46da6ab952a Mon Sep 17 00:00:00 2001 From: Max Bachmann Date: Sat, 7 Oct 2023 00:00:29 +0200 Subject: [PATCH] only import numpy locally --- tests/test_hypothesis.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_hypothesis.py b/tests/test_hypothesis.py index 6d1969a0..cb6f90bb 100644 --- a/tests/test_hypothesis.py +++ b/tests/test_hypothesis.py @@ -3,7 +3,6 @@ from string import ascii_letters, digits, punctuation import hypothesis.strategies as st -import numpy as np import pytest from hypothesis import assume, given, settings @@ -168,6 +167,7 @@ def partial_ratio_short_needle(s1, s2): def cdist_scorer(queries, choices, scorer): + import numpy as np matrix = np.zeros((len(queries), len(choices)), dtype=np.uint8) for i, query in enumerate(queries): @@ -178,6 +178,7 @@ def cdist_scorer(queries, choices, scorer): def cdist_distance(queries, choices, scorer): + import numpy as np matrix = np.zeros((len(queries), len(choices)), dtype=np.int32) for i, query in enumerate(queries):