diff --git a/thinc/tests/test_util.py b/thinc/tests/test_util.py index b51f23a19..715d381d5 100644 --- a/thinc/tests/test_util.py +++ b/thinc/tests/test_util.py @@ -46,7 +46,9 @@ def test_array_module_cpu_gpu_helpers(): assert not is_numpy_array((1, 2)) -@given(label_smoothing=strategies.floats(min_value=0.0, max_value=0.5)) +@given( + label_smoothing=strategies.floats(min_value=0.0, max_value=0.5, exclude_max=True) +) def test_to_categorical(label_smoothing): # Test without n_classes one_hot = to_categorical(numpy.asarray([1, 2], dtype="i"))