We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0f8481b commit d8a2b01Copy full SHA for d8a2b01
test/test_decode.py
@@ -260,11 +260,17 @@ def test_consistent_decodes_all_values(
260
npivals = np.arange(
261
np.iinfo(int_dtype).min, int(np.iinfo(int_dtype).max) + 1, dtype=int_dtype
262
)
263
- npfvals = npivals.view(dtype=npfmt)
+ npfvals = npivals.view(dtype=npfmt).astype(np.float64)
264
+
265
+ # Scalar version
266
for i, npfval in zip(npivals, npfvals):
267
val = decode_float(fmt, int(i))
268
np.testing.assert_equal(val.fval, npfval)
269
270
+ # Vector version
271
+ vals = decode_ndarray(fmt, npivals)
272
+ np.testing.assert_equal(vals, npfvals)
273
274
275
@pytest.mark.parametrize("v", [-1, 0x10000])
276
def test_except(v: int) -> None:
0 commit comments