dycw-utilities 0.159.2__py3-none-any.whl → 0.159.3__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.159.2.dist-info → dycw_utilities-0.159.3.dist-info}/METADATA +1 -1
- {dycw_utilities-0.159.2.dist-info → dycw_utilities-0.159.3.dist-info}/RECORD +8 -8
- utilities/__init__.py +1 -1
- utilities/polars.py +38 -0
- utilities/types.py +4 -0
- {dycw_utilities-0.159.2.dist-info → dycw_utilities-0.159.3.dist-info}/WHEEL +0 -0
- {dycw_utilities-0.159.2.dist-info → dycw_utilities-0.159.3.dist-info}/entry_points.txt +0 -0
- {dycw_utilities-0.159.2.dist-info → dycw_utilities-0.159.3.dist-info}/licenses/LICENSE +0 -0
@@ -1,4 +1,4 @@
|
|
1
|
-
utilities/__init__.py,sha256=
|
1
|
+
utilities/__init__.py,sha256=VdqkGeeq4rCnCdHuCDKZa_vNmpgPYng4SgWvMihfJwo,60
|
2
2
|
utilities/altair.py,sha256=92E2lCdyHY4Zb-vCw6rEJIsWdKipuu-Tu2ab1ufUfAk,9079
|
3
3
|
utilities/asyncio.py,sha256=PUedzQ5deqlSECQ33sam9cRzI9TnygHz3FdOqWJWPTM,15288
|
4
4
|
utilities/atomicwrites.py,sha256=tPo6r-Rypd9u99u66B9z86YBPpnLrlHtwox_8Z7T34Y,5790
|
@@ -45,7 +45,7 @@ utilities/parse.py,sha256=JcJn5yXKhIWXBCwgBdPsyu7Hvcuw6kyEdqvaebCaI9k,17951
|
|
45
45
|
utilities/pathlib.py,sha256=qGuU8XPmdgGpy8tOMUgelfXx3kxI8h9IaV3TI_06QGE,8428
|
46
46
|
utilities/pickle.py,sha256=MBT2xZCsv0pH868IXLGKnlcqNx2IRVKYNpRcqiQQqxw,653
|
47
47
|
utilities/platform.py,sha256=pTn7gw6N4T6LdKrf0virwarof_mze9WtoQlrGMzhGVI,2798
|
48
|
-
utilities/polars.py,sha256=
|
48
|
+
utilities/polars.py,sha256=_pQS5wmtkMgu5CZZKDVA4AnT6NyLSlYKe5GK6hBR7vU,77876
|
49
49
|
utilities/polars_ols.py,sha256=Uc9V5kvlWZ5cU93lKZ-cfAKdVFFw81tqwLW9PxtUvMs,5618
|
50
50
|
utilities/postgres.py,sha256=ynCTTaF-bVEOSW-KEAR-dlLh_hYjeVVjm__-4pEU8Zk,12269
|
51
51
|
utilities/pottery.py,sha256=ggMN72Y7wx7Js8VN6eyNyodpm8TIYqZHGghkDPXIVWk,3949
|
@@ -74,7 +74,7 @@ utilities/threading.py,sha256=GvBOp4CyhHfN90wGXZuA2VKe9fGzMaEa7oCl4f3nnPU,1009
|
|
74
74
|
utilities/timer.py,sha256=oXfTii6ymu57niP0BDGZjFD55LEHi2a19kqZKiTgaFQ,2588
|
75
75
|
utilities/traceback.py,sha256=1k5JgumSMaqAGLd0dZ36CtPS0EGaglxTr29r2Dz4D60,9457
|
76
76
|
utilities/typed_settings.py,sha256=SFWqS3lAzV7IfNRwqFcTk0YynTcQ7BmrcW2mr_KUnos,4466
|
77
|
-
utilities/types.py,sha256=
|
77
|
+
utilities/types.py,sha256=zVMapJd3i6xPrY4VagawVfBW_a-ygIKWffwXqxcH0bo,18604
|
78
78
|
utilities/typing.py,sha256=7ZgCNZwA6oaiwpSJIS9Rj3i3MbRBYHMqbC3jMe5KiNg,13992
|
79
79
|
utilities/tzdata.py,sha256=fgNVj66yUbCSI_-vrRVzSD3gtf-L_8IEJEPjP_Jel5Y,266
|
80
80
|
utilities/tzlocal.py,sha256=KyCXEgCTjqGFx-389JdTuhMRUaT06U1RCMdWoED-qro,728
|
@@ -87,8 +87,8 @@ utilities/zoneinfo.py,sha256=FBMcUQ4662Aq8SsuCL1OAhDQiyANmVjtb-C30DRrWoE,1966
|
|
87
87
|
utilities/pytest_plugins/__init__.py,sha256=U4S_2y3zgLZVfMenHRaJFBW8yqh2mUBuI291LGQVOJ8,35
|
88
88
|
utilities/pytest_plugins/pytest_randomly.py,sha256=B1qYVlExGOxTywq2r1SMi5o7btHLk2PNdY_b1p98dkE,409
|
89
89
|
utilities/pytest_plugins/pytest_regressions.py,sha256=9v8kAXDM2ycIXJBimoiF4EgrwbUvxTycFWJiGR_GHhM,1466
|
90
|
-
dycw_utilities-0.159.
|
91
|
-
dycw_utilities-0.159.
|
92
|
-
dycw_utilities-0.159.
|
93
|
-
dycw_utilities-0.159.
|
94
|
-
dycw_utilities-0.159.
|
90
|
+
dycw_utilities-0.159.3.dist-info/METADATA,sha256=vx1O7lyZWHV89NyvhKldxK9kl_d9wpawar1WayIcveA,1643
|
91
|
+
dycw_utilities-0.159.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
92
|
+
dycw_utilities-0.159.3.dist-info/entry_points.txt,sha256=BOD_SoDxwsfJYOLxhrSXhHP_T7iw-HXI9f2WVkzYxvQ,135
|
93
|
+
dycw_utilities-0.159.3.dist-info/licenses/LICENSE,sha256=gppZp16M6nSVpBbUBrNL6JuYfvKwZiKgV7XoKKsHzqo,1066
|
94
|
+
dycw_utilities-0.159.3.dist-info/RECORD,,
|
utilities/__init__.py
CHANGED
utilities/polars.py
CHANGED
@@ -36,6 +36,7 @@ from polars import (
|
|
36
36
|
datetime_range,
|
37
37
|
int_range,
|
38
38
|
lit,
|
39
|
+
max_horizontal,
|
39
40
|
struct,
|
40
41
|
sum_horizontal,
|
41
42
|
when,
|
@@ -1641,6 +1642,42 @@ def integers(
|
|
1641
1642
|
##
|
1642
1643
|
|
1643
1644
|
|
1645
|
+
@overload
|
1646
|
+
def is_close(
|
1647
|
+
x: ExprLike, y: ExprLike, /, *, rel_tol: float = 1e-9, abs_tol: float = 0
|
1648
|
+
) -> Expr: ...
|
1649
|
+
@overload
|
1650
|
+
def is_close(
|
1651
|
+
x: Series, y: Series, /, *, rel_tol: float = 1e-9, abs_tol: float = 0
|
1652
|
+
) -> Series: ...
|
1653
|
+
@overload
|
1654
|
+
def is_close(
|
1655
|
+
x: IntoExprColumn,
|
1656
|
+
y: IntoExprColumn,
|
1657
|
+
/,
|
1658
|
+
*,
|
1659
|
+
rel_tol: float = 1e-9,
|
1660
|
+
abs_tol: float = 0,
|
1661
|
+
) -> ExprOrSeries: ...
|
1662
|
+
def is_close(
|
1663
|
+
x: IntoExprColumn,
|
1664
|
+
y: IntoExprColumn,
|
1665
|
+
/,
|
1666
|
+
*,
|
1667
|
+
rel_tol: float = 1e-9,
|
1668
|
+
abs_tol: float = 0,
|
1669
|
+
) -> ExprOrSeries:
|
1670
|
+
"""Check if two columns are close."""
|
1671
|
+
x, y = map(ensure_expr_or_series, [x, y])
|
1672
|
+
result = (x - y).abs() <= max_horizontal(
|
1673
|
+
rel_tol * max_horizontal(x.abs(), y.abs()), abs_tol
|
1674
|
+
)
|
1675
|
+
return try_reify_expr(result, x, y)
|
1676
|
+
|
1677
|
+
|
1678
|
+
##
|
1679
|
+
|
1680
|
+
|
1644
1681
|
@overload
|
1645
1682
|
def is_near_event(
|
1646
1683
|
*exprs: ExprLike, before: int = 0, after: int = 0, **named_exprs: ExprLike
|
@@ -2603,6 +2640,7 @@ __all__ = [
|
|
2603
2640
|
"insert_before",
|
2604
2641
|
"insert_between",
|
2605
2642
|
"integers",
|
2643
|
+
"is_close",
|
2606
2644
|
"is_false",
|
2607
2645
|
"is_near_event",
|
2608
2646
|
"is_true",
|
utilities/types.py
CHANGED
@@ -79,6 +79,9 @@ type MaybeCoro[T] = T | Coro[T]
|
|
79
79
|
|
80
80
|
|
81
81
|
# collections.abc
|
82
|
+
type SupportsFloatOrIndex = SupportsFloat | SupportsIndex
|
83
|
+
|
84
|
+
|
82
85
|
@runtime_checkable
|
83
86
|
class SupportsKeysAndGetItem(Protocol[_T, _T_co]):
|
84
87
|
def keys(self) -> Iterable[_T]: ... # pragma: no cover
|
@@ -328,6 +331,7 @@ __all__ = [
|
|
328
331
|
"SupportsBytes",
|
329
332
|
"SupportsComplex",
|
330
333
|
"SupportsFloat",
|
334
|
+
"SupportsFloatOrIndex",
|
331
335
|
"SupportsGT",
|
332
336
|
"SupportsInt",
|
333
337
|
"SupportsInt",
|
File without changes
|
File without changes
|
File without changes
|