dycw-utilities 0.151.0__py3-none-any.whl → 0.151.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {dycw_utilities-0.151.0.dist-info → dycw_utilities-0.151.1.dist-info}/METADATA +1 -1
- {dycw_utilities-0.151.0.dist-info → dycw_utilities-0.151.1.dist-info}/RECORD +7 -7
- utilities/__init__.py +1 -1
- utilities/hypothesis.py +37 -1
- {dycw_utilities-0.151.0.dist-info → dycw_utilities-0.151.1.dist-info}/WHEEL +0 -0
- {dycw_utilities-0.151.0.dist-info → dycw_utilities-0.151.1.dist-info}/entry_points.txt +0 -0
- {dycw_utilities-0.151.0.dist-info → dycw_utilities-0.151.1.dist-info}/licenses/LICENSE +0 -0
@@ -1,4 +1,4 @@
|
|
1
|
-
utilities/__init__.py,sha256=
|
1
|
+
utilities/__init__.py,sha256=bBf9Tl-C2hugDGfPB8K4pQzyp1XJyFusRFY_wkOtfbk,60
|
2
2
|
utilities/altair.py,sha256=92E2lCdyHY4Zb-vCw6rEJIsWdKipuu-Tu2ab1ufUfAk,9079
|
3
3
|
utilities/asyncio.py,sha256=2m2a2C-Qgc6OHTTHL332-t66A7xDITt_SORT7a1DJWo,16792
|
4
4
|
utilities/atomicwrites.py,sha256=xcOWenTBRS0oat3kg7Sqe51AohNThMQ2ixPL7QCG8hw,5795
|
@@ -23,7 +23,7 @@ utilities/getpass.py,sha256=DfN5UgMAtFCqS3dSfFHUfqIMZX2shXvwphOz_6J6f6A,103
|
|
23
23
|
utilities/gzip.py,sha256=fkGP3KdsBfXlstodT4wtlp-PwNyUsogpbDCVVVGdsm4,781
|
24
24
|
utilities/hashlib.py,sha256=SVTgtguur0P4elppvzOBbLEjVM3Pea0eWB61yg2ilxo,309
|
25
25
|
utilities/http.py,sha256=TsavEfHlRtlLaeV21Z6KZh0qbPw-kvD1zsQdZ7Kep5Q,977
|
26
|
-
utilities/hypothesis.py,sha256=
|
26
|
+
utilities/hypothesis.py,sha256=muEtgWd8ZR7z4Iv-demKK3dBJY6dC26FYIzNcDd0ViE,40267
|
27
27
|
utilities/importlib.py,sha256=mV1xT_O_zt_GnZZ36tl3xOmMaN_3jErDWY54fX39F6Y,429
|
28
28
|
utilities/inflect.py,sha256=UWOsMRJUJXqcR3rgrQmb35mat-Theu5xo-M9E33eTIE,586
|
29
29
|
utilities/ipython.py,sha256=V2oMYHvEKvlNBzxDXdLvKi48oUq2SclRg5xasjaXStw,763
|
@@ -89,8 +89,8 @@ utilities/zoneinfo.py,sha256=oEH-nL3t4h9uawyZqWDtNtDAl6M-CLpLYGI_nI6DulM,1971
|
|
89
89
|
utilities/pytest_plugins/__init__.py,sha256=U4S_2y3zgLZVfMenHRaJFBW8yqh2mUBuI291LGQVOJ8,35
|
90
90
|
utilities/pytest_plugins/pytest_randomly.py,sha256=NXzCcGKbpgYouz5yehKb4jmxmi2SexKKpgF4M65bi10,414
|
91
91
|
utilities/pytest_plugins/pytest_regressions.py,sha256=Iwhfv_OJH7UCPZCfoh7ugZ2Xjqjil-BBBsOb8sDwiGI,1471
|
92
|
-
dycw_utilities-0.151.
|
93
|
-
dycw_utilities-0.151.
|
94
|
-
dycw_utilities-0.151.
|
95
|
-
dycw_utilities-0.151.
|
96
|
-
dycw_utilities-0.151.
|
92
|
+
dycw_utilities-0.151.1.dist-info/METADATA,sha256=Ooil0Z8qgBzFL5vPNHUBYeOBu0IY_K6DKtX1is2oQ08,1696
|
93
|
+
dycw_utilities-0.151.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
94
|
+
dycw_utilities-0.151.1.dist-info/entry_points.txt,sha256=BOD_SoDxwsfJYOLxhrSXhHP_T7iw-HXI9f2WVkzYxvQ,135
|
95
|
+
dycw_utilities-0.151.1.dist-info/licenses/LICENSE,sha256=gppZp16M6nSVpBbUBrNL6JuYfvKwZiKgV7XoKKsHzqo,1066
|
96
|
+
dycw_utilities-0.151.1.dist-info/RECORD,,
|
utilities/__init__.py
CHANGED
utilities/hypothesis.py
CHANGED
@@ -56,12 +56,16 @@ from utilities.math import (
|
|
56
56
|
MAX_FLOAT64,
|
57
57
|
MAX_INT32,
|
58
58
|
MAX_INT64,
|
59
|
+
MAX_UINT8,
|
60
|
+
MAX_UINT16,
|
59
61
|
MAX_UINT32,
|
60
62
|
MAX_UINT64,
|
61
63
|
MIN_FLOAT32,
|
62
64
|
MIN_FLOAT64,
|
63
65
|
MIN_INT32,
|
64
66
|
MIN_INT64,
|
67
|
+
MIN_UINT8,
|
68
|
+
MIN_UINT16,
|
65
69
|
MIN_UINT32,
|
66
70
|
MIN_UINT64,
|
67
71
|
is_zero,
|
@@ -836,7 +840,7 @@ def random_states(
|
|
836
840
|
"""Strategy for generating `numpy` random states."""
|
837
841
|
from numpy.random import RandomState
|
838
842
|
|
839
|
-
seed_ = draw2(draw, seed,
|
843
|
+
seed_ = draw2(draw, seed, uint32s())
|
840
844
|
return RandomState(seed=seed_)
|
841
845
|
|
842
846
|
|
@@ -1226,6 +1230,36 @@ def _triples_map[T](elements: list[T], /) -> tuple[T, T, T]:
|
|
1226
1230
|
##
|
1227
1231
|
|
1228
1232
|
|
1233
|
+
@composite
|
1234
|
+
def uint8s(
|
1235
|
+
draw: DrawFn,
|
1236
|
+
/,
|
1237
|
+
*,
|
1238
|
+
min_value: MaybeSearchStrategy[int] = MIN_UINT8,
|
1239
|
+
max_value: MaybeSearchStrategy[int] = MAX_UINT8,
|
1240
|
+
) -> int:
|
1241
|
+
"""Strategy for generating uint8s."""
|
1242
|
+
min_value_, max_value_ = [draw2(draw, v) for v in [min_value, max_value]]
|
1243
|
+
min_value_ = max(min_value_, MIN_UINT8)
|
1244
|
+
max_value_ = min(max_value_, MAX_UINT8)
|
1245
|
+
return draw(integers(min_value=min_value_, max_value=max_value_))
|
1246
|
+
|
1247
|
+
|
1248
|
+
@composite
|
1249
|
+
def uint16s(
|
1250
|
+
draw: DrawFn,
|
1251
|
+
/,
|
1252
|
+
*,
|
1253
|
+
min_value: MaybeSearchStrategy[int] = MIN_UINT16,
|
1254
|
+
max_value: MaybeSearchStrategy[int] = MAX_UINT16,
|
1255
|
+
) -> int:
|
1256
|
+
"""Strategy for generating uint16s."""
|
1257
|
+
min_value_, max_value_ = [draw2(draw, v) for v in [min_value, max_value]]
|
1258
|
+
min_value_ = max(min_value_, MIN_UINT16)
|
1259
|
+
max_value_ = min(max_value_, MAX_UINT16)
|
1260
|
+
return draw(integers(min_value=min_value_, max_value=max_value_))
|
1261
|
+
|
1262
|
+
|
1229
1263
|
@composite
|
1230
1264
|
def uint32s(
|
1231
1265
|
draw: DrawFn,
|
@@ -1426,6 +1460,8 @@ __all__ = [
|
|
1426
1460
|
"time_deltas",
|
1427
1461
|
"times",
|
1428
1462
|
"triples",
|
1463
|
+
"uint8s",
|
1464
|
+
"uint16s",
|
1429
1465
|
"uint32s",
|
1430
1466
|
"uint64s",
|
1431
1467
|
"urls",
|
File without changes
|
File without changes
|
File without changes
|