Skip to content

Commit 302124a

Browse files
committed
FPAccuracy.LOW -> FPAccuracy.MEDIUM
1 parent df449a2 commit 302124a

4 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/blosc2/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,9 @@ class FPAccuracy(Enum):
123123
#: Use 1.0 ULPs (Units in the Last Place) for floating point functions
124124
HIGH = 1
125125
#: Use 3.5 ULPs (Units in the Last Place) for floating point functions
126-
LOW = 2
127-
#: Use default accuracy. This is LOW, which is enough for most applications.
128-
DEFAULT = LOW
126+
MEDIUM = 2
127+
#: Use default accuracy. This is MEDIUM, which should be enough for most applications.
128+
DEFAULT = MEDIUM
129129

130130

131131
from .blosc2_ext import (

src/blosc2/blosc2_ext.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2932,7 +2932,7 @@ cdef class NDArray:
29322932
udata.ninputs = ninputs
29332933
cdef me_eval_params* eval_params = <me_eval_params*> malloc(sizeof(me_eval_params))
29342934
eval_params.disable_simd = False
2935-
eval_params.simd_ulp_mode = ME_SIMD_ULP_3_5 if fp_accuracy == blosc2.FPAccuracy.LOW else ME_SIMD_ULP_1
2935+
eval_params.simd_ulp_mode = ME_SIMD_ULP_3_5 if fp_accuracy == blosc2.FPAccuracy.MEDIUM else ME_SIMD_ULP_1
29362936
udata.eval_params = eval_params
29372937
udata.array = self.array
29382938
cdef void* aux_reduc_ptr = NULL

tests/ndarray/test_lazyexpr.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ def test_expression_with_constants(array_fixture):
279279

280280

281281
@pytest.mark.parametrize("dtype", [np.float32, np.float64])
282-
@pytest.mark.parametrize("accuracy", [blosc2.FPAccuracy.LOW, blosc2.FPAccuracy.HIGH])
282+
@pytest.mark.parametrize("accuracy", [blosc2.FPAccuracy.MEDIUM, blosc2.FPAccuracy.HIGH])
283283
def test_fp_accuracy(accuracy, dtype):
284284
a1 = blosc2.linspace(0, 10, NITEMS, dtype=dtype, chunks=(1000,), blocks=(500,))
285285
a2 = blosc2.linspace(0, 10, NITEMS, dtype=dtype, chunks=(1000,), blocks=(500,))

tests/ndarray/test_reductions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ def test_reduce_where(array_fixture, reduce_op):
8888

8989

9090
@pytest.mark.parametrize("dtype", [np.float32, np.float64])
91-
@pytest.mark.parametrize("accuracy", [blosc2.FPAccuracy.LOW, blosc2.FPAccuracy.HIGH])
91+
@pytest.mark.parametrize("accuracy", [blosc2.FPAccuracy.MEDIUM, blosc2.FPAccuracy.HIGH])
9292
def test_fp_accuracy(accuracy, dtype):
9393
a1 = blosc2.linspace(0, 10, NITEMS, dtype=dtype, chunks=(1000,), blocks=(500,))
9494
a2 = blosc2.linspace(0, 10, NITEMS, dtype=dtype, chunks=(1000,), blocks=(500,))

0 commit comments

Comments
 (0)