From 0462b5f02e6e1c4d194392003fd58a8b3a507542 Mon Sep 17 00:00:00 2001 From: kklein Date: Tue, 3 Sep 2024 13:56:47 +0200 Subject: [PATCH 1/6] Add polars as dependency. --- pixi.lock | 274 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ pixi.toml | 1 + 2 files changed, 275 insertions(+) diff --git a/pixi.lock b/pixi.lock index cb9aa72..98fdae0 100644 --- a/pixi.lock +++ b/pixi.lock @@ -665,6 +665,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/noarch/pkgutil-resolve-name-1.3.10-pyhd8ed1ab_1.conda - conda: https://conda.anaconda.org/conda-forge/noarch/platformdirs-4.2.2-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/pluggy-1.5.0-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/polars-1.5.0-py312h7285250_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/pre-commit-3.8.0-pyha770c72_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/prompt-toolkit-3.0.47-pyha770c72_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/protobuf-4.25.3-py312h72fbbdf_0.conda @@ -905,6 +906,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/noarch/pkgutil-resolve-name-1.3.10-pyhd8ed1ab_1.conda - conda: https://conda.anaconda.org/conda-forge/noarch/platformdirs-4.2.2-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/pluggy-1.5.0-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/polars-1.6.0-py312h3598bc1_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/pre-commit-3.8.0-pyha770c72_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/prompt-toolkit-3.0.47-pyha770c72_0.conda - conda: https://conda.anaconda.org/conda-forge/osx-64/protobuf-4.25.3-py312hf6c9040_0.conda @@ -1145,6 +1147,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/noarch/pkgutil-resolve-name-1.3.10-pyhd8ed1ab_1.conda - conda: https://conda.anaconda.org/conda-forge/noarch/platformdirs-4.2.2-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/pluggy-1.5.0-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/polars-1.6.0-py312h672d452_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/pre-commit-3.8.0-pyha770c72_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/prompt-toolkit-3.0.47-pyha770c72_0.conda - conda: https://conda.anaconda.org/conda-forge/osx-arm64/protobuf-4.25.3-py312h1a610f3_0.conda @@ -1379,6 +1382,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/noarch/pkgutil-resolve-name-1.3.10-pyhd8ed1ab_1.conda - conda: https://conda.anaconda.org/conda-forge/noarch/platformdirs-4.2.2-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/pluggy-1.5.0-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/polars-1.6.0-py312hcd8180c_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/pre-commit-3.8.0-pyha770c72_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/prompt-toolkit-3.0.47-pyha770c72_0.conda - conda: https://conda.anaconda.org/conda-forge/win-64/protobuf-4.25.3-py312h5594109_0.conda @@ -1633,6 +1637,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/noarch/pkgutil-resolve-name-1.3.10-pyhd8ed1ab_1.conda - conda: https://conda.anaconda.org/conda-forge/noarch/platformdirs-4.2.2-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/pluggy-1.5.0-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/polars-1.5.0-py312h7285250_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/pre-commit-3.8.0-pyha770c72_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/prompt-toolkit-3.0.47-pyha770c72_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/protobuf-4.25.3-py312h72fbbdf_0.conda @@ -1871,6 +1876,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/noarch/pkgutil-resolve-name-1.3.10-pyhd8ed1ab_1.conda - conda: https://conda.anaconda.org/conda-forge/noarch/platformdirs-4.2.2-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/pluggy-1.5.0-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/polars-1.6.0-py312h3598bc1_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/pre-commit-3.8.0-pyha770c72_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/prompt-toolkit-3.0.47-pyha770c72_0.conda - conda: https://conda.anaconda.org/conda-forge/osx-64/protobuf-4.25.3-py312hf6c9040_0.conda @@ -2109,6 +2115,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/noarch/pkgutil-resolve-name-1.3.10-pyhd8ed1ab_1.conda - conda: https://conda.anaconda.org/conda-forge/noarch/platformdirs-4.2.2-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/pluggy-1.5.0-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/polars-1.6.0-py312h672d452_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/pre-commit-3.8.0-pyha770c72_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/prompt-toolkit-3.0.47-pyha770c72_0.conda - conda: https://conda.anaconda.org/conda-forge/osx-arm64/protobuf-4.25.3-py312h1a610f3_0.conda @@ -2341,6 +2348,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/noarch/pkgutil-resolve-name-1.3.10-pyhd8ed1ab_1.conda - conda: https://conda.anaconda.org/conda-forge/noarch/platformdirs-4.2.2-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/pluggy-1.5.0-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/polars-1.6.0-py312hcd8180c_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/pre-commit-3.8.0-pyha770c72_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/prompt-toolkit-3.0.47-pyha770c72_0.conda - conda: https://conda.anaconda.org/conda-forge/win-64/protobuf-4.25.3-py312h5594109_0.conda @@ -2645,6 +2653,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/noarch/platformdirs-4.2.2-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/plotly-5.23.0-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/pluggy-1.5.0-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/polars-1.5.0-py311hf29da40_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/pre-commit-3.8.0-pyha770c72_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/prompt-toolkit-3.0.47-pyha770c72_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/protobuf-4.25.3-py311h7b78aeb_0.conda @@ -2966,6 +2975,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/noarch/platformdirs-4.2.2-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/plotly-5.23.0-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/pluggy-1.5.0-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/polars-1.6.0-py311h444c59e_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/pre-commit-3.8.0-pyha770c72_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/prompt-toolkit-3.0.47-pyha770c72_0.conda - conda: https://conda.anaconda.org/conda-forge/osx-64/protobuf-4.25.3-py311h01b5fa2_0.conda @@ -3278,6 +3288,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/noarch/platformdirs-4.2.2-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/plotly-5.23.0-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/pluggy-1.5.0-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/polars-1.6.0-py311h25d7fa9_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/pre-commit-3.8.0-pyha770c72_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/prompt-toolkit-3.0.47-pyha770c72_0.conda - conda: https://conda.anaconda.org/conda-forge/osx-arm64/protobuf-4.25.3-py311hea19e3d_0.conda @@ -3580,6 +3591,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/noarch/platformdirs-4.2.2-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/plotly-5.23.0-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/pluggy-1.5.0-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/polars-1.6.0-py311h6bf133b_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/pre-commit-3.8.0-pyha770c72_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/prompt-toolkit-3.0.47-pyha770c72_0.conda - conda: https://conda.anaconda.org/conda-forge/win-64/protobuf-4.25.3-py311hb041b4a_0.conda @@ -4129,6 +4141,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/noarch/pkgutil-resolve-name-1.3.10-pyhd8ed1ab_1.conda - conda: https://conda.anaconda.org/conda-forge/noarch/platformdirs-4.2.2-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/pluggy-1.5.0-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/polars-1.5.0-py310h6b4eda4_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/pre-commit-3.8.0-pyha770c72_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/prompt-toolkit-3.0.47-pyha770c72_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/protobuf-4.25.3-py310ha8c1f0e_0.conda @@ -4367,6 +4380,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/noarch/pkgutil-resolve-name-1.3.10-pyhd8ed1ab_1.conda - conda: https://conda.anaconda.org/conda-forge/noarch/platformdirs-4.2.2-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/pluggy-1.5.0-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/polars-1.6.0-py310hacc4c73_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/pre-commit-3.8.0-pyha770c72_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/prompt-toolkit-3.0.47-pyha770c72_0.conda - conda: https://conda.anaconda.org/conda-forge/osx-64/protobuf-4.25.3-py310h9015309_0.conda @@ -4605,6 +4619,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/noarch/pkgutil-resolve-name-1.3.10-pyhd8ed1ab_1.conda - conda: https://conda.anaconda.org/conda-forge/noarch/platformdirs-4.2.2-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/pluggy-1.5.0-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/polars-1.6.0-py310hc2d7698_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/pre-commit-3.8.0-pyha770c72_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/prompt-toolkit-3.0.47-pyha770c72_0.conda - conda: https://conda.anaconda.org/conda-forge/osx-arm64/protobuf-4.25.3-py310h1e88e72_0.conda @@ -4837,6 +4852,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/noarch/pkgutil-resolve-name-1.3.10-pyhd8ed1ab_1.conda - conda: https://conda.anaconda.org/conda-forge/noarch/platformdirs-4.2.2-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/pluggy-1.5.0-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/polars-1.6.0-py310heef5704_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/pre-commit-3.8.0-pyha770c72_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/prompt-toolkit-3.0.47-pyha770c72_0.conda - conda: https://conda.anaconda.org/conda-forge/win-64/protobuf-4.25.3-py310hf536535_0.conda @@ -5092,6 +5108,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/noarch/pkgutil-resolve-name-1.3.10-pyhd8ed1ab_1.conda - conda: https://conda.anaconda.org/conda-forge/noarch/platformdirs-4.2.2-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/pluggy-1.5.0-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/polars-1.5.0-py311hf29da40_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/pre-commit-3.8.0-pyha770c72_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/prompt-toolkit-3.0.47-pyha770c72_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/protobuf-4.25.3-py311h7b78aeb_0.conda @@ -5330,6 +5347,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/noarch/pkgutil-resolve-name-1.3.10-pyhd8ed1ab_1.conda - conda: https://conda.anaconda.org/conda-forge/noarch/platformdirs-4.2.2-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/pluggy-1.5.0-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/polars-1.6.0-py311h444c59e_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/pre-commit-3.8.0-pyha770c72_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/prompt-toolkit-3.0.47-pyha770c72_0.conda - conda: https://conda.anaconda.org/conda-forge/osx-64/protobuf-4.25.3-py311h01b5fa2_0.conda @@ -5568,6 +5586,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/noarch/pkgutil-resolve-name-1.3.10-pyhd8ed1ab_1.conda - conda: https://conda.anaconda.org/conda-forge/noarch/platformdirs-4.2.2-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/pluggy-1.5.0-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/polars-1.6.0-py311h25d7fa9_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/pre-commit-3.8.0-pyha770c72_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/prompt-toolkit-3.0.47-pyha770c72_0.conda - conda: https://conda.anaconda.org/conda-forge/osx-arm64/protobuf-4.25.3-py311hea19e3d_0.conda @@ -5800,6 +5819,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/noarch/pkgutil-resolve-name-1.3.10-pyhd8ed1ab_1.conda - conda: https://conda.anaconda.org/conda-forge/noarch/platformdirs-4.2.2-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/pluggy-1.5.0-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/polars-1.6.0-py311h6bf133b_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/pre-commit-3.8.0-pyha770c72_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/prompt-toolkit-3.0.47-pyha770c72_0.conda - conda: https://conda.anaconda.org/conda-forge/win-64/protobuf-4.25.3-py311hb041b4a_0.conda @@ -6054,6 +6074,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/noarch/pkgutil-resolve-name-1.3.10-pyhd8ed1ab_1.conda - conda: https://conda.anaconda.org/conda-forge/noarch/platformdirs-4.2.2-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/pluggy-1.5.0-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/linux-64/polars-1.5.0-py312h7285250_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/pre-commit-3.8.0-pyha770c72_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/prompt-toolkit-3.0.47-pyha770c72_0.conda - conda: https://conda.anaconda.org/conda-forge/linux-64/protobuf-4.25.3-py312h72fbbdf_0.conda @@ -6292,6 +6313,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/noarch/pkgutil-resolve-name-1.3.10-pyhd8ed1ab_1.conda - conda: https://conda.anaconda.org/conda-forge/noarch/platformdirs-4.2.2-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/pluggy-1.5.0-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-64/polars-1.6.0-py312h3598bc1_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/pre-commit-3.8.0-pyha770c72_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/prompt-toolkit-3.0.47-pyha770c72_0.conda - conda: https://conda.anaconda.org/conda-forge/osx-64/protobuf-4.25.3-py312hf6c9040_0.conda @@ -6530,6 +6552,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/noarch/pkgutil-resolve-name-1.3.10-pyhd8ed1ab_1.conda - conda: https://conda.anaconda.org/conda-forge/noarch/platformdirs-4.2.2-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/pluggy-1.5.0-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/osx-arm64/polars-1.6.0-py312h672d452_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/pre-commit-3.8.0-pyha770c72_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/prompt-toolkit-3.0.47-pyha770c72_0.conda - conda: https://conda.anaconda.org/conda-forge/osx-arm64/protobuf-4.25.3-py312h1a610f3_0.conda @@ -6762,6 +6785,7 @@ environments: - conda: https://conda.anaconda.org/conda-forge/noarch/pkgutil-resolve-name-1.3.10-pyhd8ed1ab_1.conda - conda: https://conda.anaconda.org/conda-forge/noarch/platformdirs-4.2.2-pyhd8ed1ab_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/pluggy-1.5.0-pyhd8ed1ab_0.conda + - conda: https://conda.anaconda.org/conda-forge/win-64/polars-1.6.0-py312hcd8180c_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/pre-commit-3.8.0-pyha770c72_0.conda - conda: https://conda.anaconda.org/conda-forge/noarch/prompt-toolkit-3.0.47-pyha770c72_0.conda - conda: https://conda.anaconda.org/conda-forge/win-64/protobuf-4.25.3-py312h5594109_0.conda @@ -21898,6 +21922,256 @@ packages: license_family: MIT size: 23815 timestamp: 1713667175451 +- kind: conda + name: polars + version: 1.5.0 + build: py310h6b4eda4_0 + subdir: linux-64 + url: https://conda.anaconda.org/conda-forge/linux-64/polars-1.5.0-py310h6b4eda4_0.conda + sha256: c02522b9e31445d4fd37800d724a7c7a1411d18e89ac296c2d148a88901e75a4 + md5: 16793922e57778be7fad1b64179caf9a + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc-ng >=12 + - numpy >=1.16.0 + - packaging + - python >=3.10,<3.11.0a0 + - python_abi 3.10.* *_cp310 + - typing_extensions >=4.0.0 + constrains: + - __glibc >=2.17 + license: MIT + license_family: MIT + size: 21254104 + timestamp: 1723705885033 +- kind: conda + name: polars + version: 1.5.0 + build: py311hf29da40_0 + subdir: linux-64 + url: https://conda.anaconda.org/conda-forge/linux-64/polars-1.5.0-py311hf29da40_0.conda + sha256: 61262983d294b492fc01a77da3bde081d1947b06bd96e480add004cbf83f5229 + md5: 04721938031ad8201c35b16f898b0c99 + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc-ng >=12 + - numpy >=1.16.0 + - packaging + - python >=3.11,<3.12.0a0 + - python_abi 3.11.* *_cp311 + constrains: + - __glibc >=2.17 + license: MIT + license_family: MIT + size: 21491541 + timestamp: 1723707068339 +- kind: conda + name: polars + version: 1.5.0 + build: py312h7285250_0 + subdir: linux-64 + url: https://conda.anaconda.org/conda-forge/linux-64/polars-1.5.0-py312h7285250_0.conda + sha256: 00e110cc00cde41902d51e7e06c2cdf68d66c2528469a0ecc39f991c92a175fe + md5: 4756b2dda06b6c7bedb376677ffbca06 + depends: + - __glibc >=2.17,<3.0.a0 + - libgcc-ng >=12 + - numpy >=1.16.0 + - packaging + - python >=3.12,<3.13.0a0 + - python_abi 3.12.* *_cp312 + constrains: + - __glibc >=2.17 + license: MIT + license_family: MIT + size: 21459138 + timestamp: 1723705909108 +- kind: conda + name: polars + version: 1.6.0 + build: py310hacc4c73_0 + subdir: osx-64 + url: https://conda.anaconda.org/conda-forge/osx-64/polars-1.6.0-py310hacc4c73_0.conda + sha256: 04bdd3b750f76d13537e0b4afbb11dafb020f05aa2a0edbfe234280a218d1001 + md5: 10b5605d3d0418fb527072e39d94c4f7 + depends: + - __osx >=10.13 + - numpy >=1.16.0 + - packaging + - python >=3.10,<3.11.0a0 + - python_abi 3.10.* *_cp310 + - typing_extensions >=4.0.0 + constrains: + - __osx >=10.13 + license: MIT + license_family: MIT + size: 20670069 + timestamp: 1724933013253 +- kind: conda + name: polars + version: 1.6.0 + build: py310hc2d7698_0 + subdir: osx-arm64 + url: https://conda.anaconda.org/conda-forge/osx-arm64/polars-1.6.0-py310hc2d7698_0.conda + sha256: bda44ce3ae73c5b07f97becf953a7970c711746b65c67e26da6789f224dcea2a + md5: fa65f96233e2381dcaf049f092e91a2c + depends: + - __osx >=11.0 + - numpy >=1.16.0 + - packaging + - python >=3.10,<3.11.0a0 + - python >=3.10,<3.11.0a0 *_cpython + - python_abi 3.10.* *_cp310 + - typing_extensions >=4.0.0 + constrains: + - __osx >=11.0 + license: MIT + license_family: MIT + size: 18384681 + timestamp: 1724940439771 +- kind: conda + name: polars + version: 1.6.0 + build: py310heef5704_0 + subdir: win-64 + url: https://conda.anaconda.org/conda-forge/win-64/polars-1.6.0-py310heef5704_0.conda + sha256: 915457f4473b1a402a2dda86396f98409868f7073015c5a0a53a54280a9f7ad1 + md5: 9619fc5388132e9db54d6fdc3b0a2be7 + depends: + - numpy >=1.16.0 + - packaging + - python >=3.10,<3.11.0a0 + - python_abi 3.10.* *_cp310 + - typing_extensions >=4.0.0 + - ucrt >=10.0.20348.0 + - vc >=14.3 + - vc14_runtime >=14.40.33810 + license: MIT + license_family: MIT + size: 21112332 + timestamp: 1724941133337 +- kind: conda + name: polars + version: 1.6.0 + build: py311h25d7fa9_0 + subdir: osx-arm64 + url: https://conda.anaconda.org/conda-forge/osx-arm64/polars-1.6.0-py311h25d7fa9_0.conda + sha256: 8529b4c99b1c269bda314a8690dbc8a488146f251ed2dc71fd4ec7c2b4a93199 + md5: c1f36ab640c70d085a8abfe65ea38b6e + depends: + - __osx >=11.0 + - numpy >=1.16.0 + - packaging + - python >=3.11,<3.12.0a0 + - python >=3.11,<3.12.0a0 *_cpython + - python_abi 3.11.* *_cp311 + constrains: + - __osx >=11.0 + license: MIT + license_family: MIT + size: 18588972 + timestamp: 1724942601192 +- kind: conda + name: polars + version: 1.6.0 + build: py311h444c59e_0 + subdir: osx-64 + url: https://conda.anaconda.org/conda-forge/osx-64/polars-1.6.0-py311h444c59e_0.conda + sha256: 149cb7b157fd832273be4a2fca2d446962b0290573fb8f238cde1a34265cd449 + md5: 8aecc1a4de0314f85ace263768e291ae + depends: + - __osx >=10.13 + - numpy >=1.16.0 + - packaging + - python >=3.11,<3.12.0a0 + - python_abi 3.11.* *_cp311 + constrains: + - __osx >=10.13 + license: MIT + license_family: MIT + size: 20775807 + timestamp: 1724932762299 +- kind: conda + name: polars + version: 1.6.0 + build: py311h6bf133b_0 + subdir: win-64 + url: https://conda.anaconda.org/conda-forge/win-64/polars-1.6.0-py311h6bf133b_0.conda + sha256: e3cf2d18808be10f67d9c1c371bf05a604326c2115ce9f647f81a9a643916a28 + md5: a1922a4299660ef4465a53a5206ba82d + depends: + - numpy >=1.16.0 + - packaging + - python >=3.11,<3.12.0a0 + - python_abi 3.11.* *_cp311 + - ucrt >=10.0.20348.0 + - vc >=14.3 + - vc14_runtime >=14.40.33810 + license: MIT + license_family: MIT + size: 21640295 + timestamp: 1724942605526 +- kind: conda + name: polars + version: 1.6.0 + build: py312h3598bc1_0 + subdir: osx-64 + url: https://conda.anaconda.org/conda-forge/osx-64/polars-1.6.0-py312h3598bc1_0.conda + sha256: 4878179f8ab02c51d87868eacd2f6c5293cdd1effed95547d9a6b6436bf3c2ca + md5: 1e63521b3a3e7472827a7e324ac40149 + depends: + - __osx >=10.13 + - numpy >=1.16.0 + - packaging + - python >=3.12,<3.13.0a0 + - python_abi 3.12.* *_cp312 + constrains: + - __osx >=10.13 + license: MIT + license_family: MIT + size: 20738957 + timestamp: 1724937033927 +- kind: conda + name: polars + version: 1.6.0 + build: py312h672d452_0 + subdir: osx-arm64 + url: https://conda.anaconda.org/conda-forge/osx-arm64/polars-1.6.0-py312h672d452_0.conda + sha256: 54684569ef7847a3a737a0d356621c5278d0ed7702a2c1f189abecf113c3c5dc + md5: 26c2e81c3d3abf1ebc3cd99732904f95 + depends: + - __osx >=11.0 + - numpy >=1.16.0 + - packaging + - python >=3.12,<3.13.0a0 + - python >=3.12,<3.13.0a0 *_cpython + - python_abi 3.12.* *_cp312 + constrains: + - __osx >=11.0 + license: MIT + license_family: MIT + size: 18618699 + timestamp: 1724941821154 +- kind: conda + name: polars + version: 1.6.0 + build: py312hcd8180c_0 + subdir: win-64 + url: https://conda.anaconda.org/conda-forge/win-64/polars-1.6.0-py312hcd8180c_0.conda + sha256: c74f2f364cbcdad40c858331d7df72eb3855c0de6b32ab8b9b6a1652901a6381 + md5: 1cef414e5d5365e60794abf1e0eaf3ec + depends: + - numpy >=1.16.0 + - packaging + - python >=3.12,<3.13.0a0 + - python_abi 3.12.* *_cp312 + - ucrt >=10.0.20348.0 + - vc >=14.3 + - vc14_runtime >=14.40.33810 + license: MIT + license_family: MIT + size: 21612736 + timestamp: 1724942779606 - kind: conda name: pox version: 0.3.4 diff --git a/pixi.toml b/pixi.toml index 16f3608..020ea66 100644 --- a/pixi.toml +++ b/pixi.toml @@ -41,6 +41,7 @@ onnx = "*" onnxmltools = "*" onnxruntime = "*" spox = "*" +polars = ">=1.5.0,<2" [feature.lint.dependencies] pre-commit = "*" From 95b50583fd53d83cdd2b6d60637bfc77fad17939 Mon Sep 17 00:00:00 2001 From: kklein Date: Thu, 5 Sep 2024 17:38:52 +0200 Subject: [PATCH 2/6] Add polars datastructures to Vector and Matrix type definitions. --- metalearners/_typing.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/metalearners/_typing.py b/metalearners/_typing.py index 10a6f4d..5643f19 100644 --- a/metalearners/_typing.py +++ b/metalearners/_typing.py @@ -6,6 +6,7 @@ import numpy as np import pandas as pd +import polars as pl import scipy.sparse as sps PredictMethod = Literal["predict", "predict_proba"] @@ -21,8 +22,8 @@ Features = Collection[str] | Collection[int] | None # ruff is not happy about the usage of Union. -Vector = Union[pd.Series, np.ndarray] # noqa -Matrix = Union[pd.DataFrame, np.ndarray, sps.csr_matrix] # noqa +Vector = Union[pd.Series, np.ndarray, pl.Series] # noqa +Matrix = Union[pd.DataFrame, np.ndarray, sps.csr_matrix, pl.DataFrame] # noqa class _ScikitModel(Protocol): From 1ef9dfdc1698a5ae6ddb64a8171eecc57a5f7108 Mon Sep 17 00:00:00 2001 From: kklein Date: Thu, 5 Sep 2024 17:41:30 +0200 Subject: [PATCH 3/6] Help mypy with to_numpy. --- metalearners/_utils.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/metalearners/_utils.py b/metalearners/_utils.py index 1297ad9..8714312 100644 --- a/metalearners/_utils.py +++ b/metalearners/_utils.py @@ -165,14 +165,15 @@ def convert_and_pad_propensity_score( propensity score per variant. The expansion assumes that the provided scores are those for the second variant. """ - if isinstance(propensity_scores, pd.Series) or isinstance( - propensity_scores, pd.DataFrame - ): - propensity_scores = propensity_scores.to_numpy() - p_is_1d = len(propensity_scores.shape) == 1 or propensity_scores.shape[1] == 1 + if isinstance(propensity_scores, np.ndarray): + np_propensity_scores = propensity_scores + else: + np_propensity_scores = propensity_scores.to_numpy() + + p_is_1d = len(np_propensity_scores.shape) == 1 or np_propensity_scores.shape[1] == 1 if n_variants == 2 and p_is_1d: - propensity_scores = np.c_[1 - propensity_scores, propensity_scores] - return propensity_scores + np_propensity_scores = np.c_[1 - np_propensity_scores, np_propensity_scores] + return np_propensity_scores def get_n_variants(propensity_scores: Matrix) -> int: From adc910c2554a65cbe20ec48601451641b8e5dd53 Mon Sep 17 00:00:00 2001 From: kklein Date: Thu, 5 Sep 2024 18:20:50 +0200 Subject: [PATCH 4/6] Appease mypy. --- metalearners/_utils.py | 18 +++++++++++++++++- metalearners/data_generation.py | 9 +++++++-- metalearners/drlearner.py | 3 ++- metalearners/metalearner.py | 2 +- metalearners/rlearner.py | 10 +++++++--- metalearners/tlearner.py | 2 +- metalearners/xlearner.py | 20 +++++++++++--------- 7 files changed, 46 insertions(+), 18 deletions(-) diff --git a/metalearners/_utils.py b/metalearners/_utils.py index 8714312..65c6ef6 100644 --- a/metalearners/_utils.py +++ b/metalearners/_utils.py @@ -9,6 +9,7 @@ import numpy as np import pandas as pd +import polars as pl import scipy from sklearn.base import check_array, check_X_y, is_classifier, is_regressor from sklearn.ensemble import ( @@ -32,8 +33,15 @@ def safe_len(X: Matrix) -> int: return len(X) +def copy_matrix(matrix: Matrix) -> Matrix: + """Make a copy of a matrix.""" + if isinstance(matrix, pl.DataFrame): + return matrix.clone() + return matrix.copy() + + def index_matrix(matrix: Matrix, rows: Vector) -> Matrix: - """Subselect certain rows from a matrix.""" + """Subselect certain ows from a matrix.""" if isinstance(rows, pd.Series): rows = rows.to_numpy() if isinstance(matrix, pd.DataFrame): @@ -60,6 +68,14 @@ def are_pd_indices_equal(*args: pd.DataFrame | pd.Series) -> bool: return True +def to_np(data: Vector | Matrix) -> np.ndarray: + if isinstance(data, np.ndarray): + return data + if hasattr(data, "to_numpy"): + return data.to_numpy() + return np.array(data) + + def is_pd_df_or_series(arg) -> bool: return isinstance(arg, pd.DataFrame) or isinstance(arg, pd.Series) diff --git a/metalearners/data_generation.py b/metalearners/data_generation.py index 2e5d14a..015b508 100644 --- a/metalearners/data_generation.py +++ b/metalearners/data_generation.py @@ -5,6 +5,7 @@ import numpy as np import pandas as pd +import polars as pl from scipy.stats import wishart from metalearners._typing import Matrix, Vector @@ -12,6 +13,7 @@ check_probability, check_propensity_score, convert_and_pad_propensity_score, + copy_matrix, default_rng, get_n_variants, sigmoid, @@ -239,8 +241,11 @@ def insert_missing( check_probability(missing_probability, zero_included=True) missing_mask = rng.binomial(1, p=missing_probability, size=X.shape).astype("bool") - masked = X.copy() - masked[missing_mask] = np.nan + masked = copy_matrix(X) + if isinstance(masked, pl.DataFrame): + raise ValueError() + else: + masked[missing_mask] = np.nan return masked diff --git a/metalearners/drlearner.py b/metalearners/drlearner.py index f2c67e1..5691647 100644 --- a/metalearners/drlearner.py +++ b/metalearners/drlearner.py @@ -29,6 +29,7 @@ index_matrix, infer_input_dict, safe_len, + to_np, validate_valid_treatment_variant_not_control, warning_experimental_feature, ) @@ -416,7 +417,7 @@ def _pseudo_outcome( y0_estimate = y0_estimate[:, 0] y1_estimate = y1_estimate[:, 0] - pseudo_outcome = ( + pseudo_outcome = to_np( ( (y - y1_estimate) / clip_element_absolute_value_to_epsilon( diff --git a/metalearners/metalearner.py b/metalearners/metalearner.py index 4024341..fe720e2 100644 --- a/metalearners/metalearner.py +++ b/metalearners/metalearner.py @@ -1336,7 +1336,7 @@ def __init__( n_folds=n_folds, random_state=random_state, ) - self._treatment_variants_mask: list[np.ndarray] | None = None + self._treatment_variants_mask: list[Vector] | None = None def predict_conditional_average_outcomes( self, X: Matrix, is_oos: bool, oos_method: OosMethod = OVERALL diff --git a/metalearners/rlearner.py b/metalearners/rlearner.py index 95cc237..93bfcd9 100644 --- a/metalearners/rlearner.py +++ b/metalearners/rlearner.py @@ -19,8 +19,10 @@ get_predict, get_predict_proba, index_matrix, + index_vector, infer_input_dict, safe_len, + to_np, validate_all_vectors_same_index, validate_valid_treatment_variant_not_control, warning_experimental_feature, @@ -516,14 +518,16 @@ def _pseudo_outcome_and_weights( y_residuals = y[mask] - y_estimates - w_binarized = w[mask] == treatment_variant + w_binarized = to_np(index_vector(w, mask) == treatment_variant) w_residuals = w_binarized - w_estimates_binarized w_residuals_padded = clip_element_absolute_value_to_epsilon( w_residuals, epsilon ) - pseudo_outcomes = y_residuals / w_residuals_padded - weights = np.square(w_residuals) + pseudo_outcomes = to_np(y_residuals / w_residuals_padded) + # In principle np.square could also return a scalar. + # We ensure that the type is np.ndarray. + weights = to_np(np.square(w_residuals)) return pseudo_outcomes, weights diff --git a/metalearners/tlearner.py b/metalearners/tlearner.py index 946d833..8a947eb 100644 --- a/metalearners/tlearner.py +++ b/metalearners/tlearner.py @@ -71,7 +71,7 @@ def fit_all_nuisance( self._validate_treatment(w) self._validate_outcome(y, w) - self._treatment_variants_mask = [] + self._treatment_variants_mask: list[Vector] = [] for v in range(self.n_variants): self._treatment_variants_mask.append(w == v) diff --git a/metalearners/xlearner.py b/metalearners/xlearner.py index f9ff549..9e0b50d 100644 --- a/metalearners/xlearner.py +++ b/metalearners/xlearner.py @@ -16,9 +16,11 @@ get_predict, get_predict_proba, index_matrix, + index_vector, infer_input_dict, infer_probabilities_output, safe_len, + to_np, validate_valid_treatment_variant_not_control, warning_experimental_feature, ) @@ -96,7 +98,7 @@ def fit_all_nuisance( self._validate_treatment(w) self._validate_outcome(y, w) - self._treatment_variants_mask = [] + self._treatment_variants_mask: list[Vector] = [] qualified_fit_params = self._qualified_fit_params(fit_params) @@ -421,12 +423,10 @@ def _pseudo_outcome( treatment_indices = w == treatment_variant control_indices = w == 0 - treatment_outcome = index_matrix( - conditional_average_outcome_estimates, control_indices - )[:, treatment_variant] - control_outcome = index_matrix( - conditional_average_outcome_estimates, treatment_indices - )[:, 0] + treatment_outcome = conditional_average_outcome_estimates[ + control_indices, treatment_variant + ] + control_outcome = conditional_average_outcome_estimates[treatment_indices, 0] if self.is_classification: # Get the probability of positive class, multiclass is currently not supported. @@ -436,8 +436,10 @@ def _pseudo_outcome( control_outcome = control_outcome[:, 0] treatment_outcome = treatment_outcome[:, 0] - imputed_te_treatment = y[treatment_indices] - control_outcome - imputed_te_control = treatment_outcome - y[control_indices] + imputed_te_treatment = ( + to_np(index_vector(y, treatment_indices)) - control_outcome + ) + imputed_te_control = treatment_outcome - to_np(index_vector(y, control_indices)) return imputed_te_control, imputed_te_treatment From 8127ca9026969ddbcc63e388e12c87bcc04c4405 Mon Sep 17 00:00:00 2001 From: kklein Date: Sun, 6 Oct 2024 17:18:21 +0200 Subject: [PATCH 5/6] Add tests. --- metalearners/_utils.py | 6 +++++- metalearners/metalearner.py | 5 +++-- tests/test_metalearner.py | 21 +++++++++++++++++---- 3 files changed, 25 insertions(+), 7 deletions(-) diff --git a/metalearners/_utils.py b/metalearners/_utils.py index 65c6ef6..dee20f0 100644 --- a/metalearners/_utils.py +++ b/metalearners/_utils.py @@ -42,10 +42,12 @@ def copy_matrix(matrix: Matrix) -> Matrix: def index_matrix(matrix: Matrix, rows: Vector) -> Matrix: """Subselect certain ows from a matrix.""" - if isinstance(rows, pd.Series): + if isinstance(rows, pd.Series) or isinstance(rows, pl.Series): rows = rows.to_numpy() if isinstance(matrix, pd.DataFrame): return matrix.iloc[rows] + if isinstance(matrix, pl.DataFrame): + return matrix.filter(pl.Series(rows)) return matrix[rows, :] @@ -55,6 +57,8 @@ def index_vector(vector: Vector, rows: Vector) -> Vector: rows = rows.to_numpy() if isinstance(vector, pd.Series): return vector.iloc[rows] + if isinstance(vector, pl.Series): + return vector.filter(rows) return vector[rows] diff --git a/metalearners/metalearner.py b/metalearners/metalearner.py index fe720e2..d54ba2a 100644 --- a/metalearners/metalearner.py +++ b/metalearners/metalearner.py @@ -30,6 +30,7 @@ ONNX_PROBABILITIES_OUTPUTS, default_metric, index_matrix, + index_vector, safe_len, validate_model_and_predict_method, validate_number_positive, @@ -343,9 +344,9 @@ def _validate_outcome(self, y: Vector, w: Vector) -> None: f" Yet we found {len(np.unique(y))} classes." ) if self.is_classification: - classes_0 = set(np.unique(y[w == 0])) + classes_0 = set(np.unique(index_vector(y, w == 0))) for tv in range(self.n_variants): - if set(np.unique(y[w == tv])) != classes_0: + if set(np.unique(index_vector(y, w == tv))) != classes_0: raise ValueError( f"Variants 0 and {tv} have seen different sets of classification outcomes. Please check your data." ) diff --git a/tests/test_metalearner.py b/tests/test_metalearner.py index 133d3d7..7fb12a0 100644 --- a/tests/test_metalearner.py +++ b/tests/test_metalearner.py @@ -7,6 +7,7 @@ import matplotlib.pyplot as plt import numpy as np import pandas as pd +import polars as pl import pytest from lightgbm import LGBMClassifier, LGBMRegressor from scipy.sparse import csr_matrix @@ -481,7 +482,7 @@ def test_combine_propensity_and_nuisance_specs( ), ], ) -@pytest.mark.parametrize("backend", ["np", "pd", "csr"]) +@pytest.mark.parametrize("backend", ["np", "pd", "csr", "pl"]) def test_feature_set(feature_set, expected_n_features, backend, rng): ml = _TestMetaLearner( nuisance_model_factory=LGBMRegressor, @@ -500,6 +501,10 @@ def test_feature_set(feature_set, expected_n_features, backend, rng): X = pd.DataFrame(X) y = pd.Series(y) w = pd.Series(w) + elif backend == "pl": + X = pl.DataFrame(X) + y = pl.Series(y) + w = pl.Series(w) elif backend == "csr": X = csr_matrix(X) ml.fit(X, y, w) @@ -1081,15 +1086,19 @@ def test_n_jobs_base_learners(implementation, rng): "implementation", [TLearner, SLearner, XLearner, RLearner, DRLearner], ) -@pytest.mark.parametrize("backend", ["np", "pd", "csr"]) +@pytest.mark.parametrize("backend", ["np", "pd", "csr", "pl"]) def test_validate_outcome_one_class(implementation, backend, rng): X = rng.standard_normal((10, 2)) y = np.zeros(10) w = rng.integers(0, 2, 10) - if backend == "pandas": + if backend == "pd": X = pd.DataFrame(X) y = pd.Series(y) w = pd.Series(w) + elif backend == "pl": + X = pl.DataFrame(X) + y = pl.Series(y) + w = pl.Series(w) elif backend == "csr": X = csr_matrix(X) @@ -1111,7 +1120,7 @@ def test_validate_outcome_one_class(implementation, backend, rng): "implementation", [TLearner, SLearner, XLearner, RLearner, DRLearner], ) -@pytest.mark.parametrize("backend", ["np", "pd", "csr"]) +@pytest.mark.parametrize("backend", ["np", "pd", "csr", "pl"]) def test_validate_outcome_different_classes(implementation, backend, rng): X = rng.standard_normal((4, 2)) y = np.array([0, 1, 0, 0]) @@ -1120,6 +1129,10 @@ def test_validate_outcome_different_classes(implementation, backend, rng): X = pd.DataFrame(X) y = pd.Series(y) w = pd.Series(w) + elif backend == "pl": + X = pl.DataFrame(X) + y = pl.Series(y) + w = pl.Series(w) elif backend == "csr": X = csr_matrix(X) From 37862d73986af26d8bf84eacfaa34117abbba8e7 Mon Sep 17 00:00:00 2001 From: kklein Date: Tue, 3 Dec 2024 13:01:35 +0100 Subject: [PATCH 6/6] Appease mypy. --- metalearners/_utils.py | 3 ++- tests/test_metalearner.py | 14 +++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/metalearners/_utils.py b/metalearners/_utils.py index dee20f0..440e52b 100644 --- a/metalearners/_utils.py +++ b/metalearners/_utils.py @@ -58,7 +58,8 @@ def index_vector(vector: Vector, rows: Vector) -> Vector: if isinstance(vector, pd.Series): return vector.iloc[rows] if isinstance(vector, pl.Series): - return vector.filter(rows) + pl_rows = pl.Series(rows) + return vector.filter(pl_rows) return vector[rows] diff --git a/tests/test_metalearner.py b/tests/test_metalearner.py index 7fb12a0..c10fdec 100644 --- a/tests/test_metalearner.py +++ b/tests/test_metalearner.py @@ -15,7 +15,7 @@ from sklearn.base import BaseEstimator from sklearn.linear_model import LinearRegression, LogisticRegression -from metalearners._typing import _ScikitModel +from metalearners._typing import Matrix, Vector, _ScikitModel from metalearners.cross_fit_estimator import CrossFitEstimator from metalearners.data_generation import insert_missing from metalearners.drlearner import DRLearner @@ -1088,9 +1088,9 @@ def test_n_jobs_base_learners(implementation, rng): ) @pytest.mark.parametrize("backend", ["np", "pd", "csr", "pl"]) def test_validate_outcome_one_class(implementation, backend, rng): - X = rng.standard_normal((10, 2)) - y = np.zeros(10) - w = rng.integers(0, 2, 10) + X: Matrix = rng.standard_normal((10, 2)) + y: Vector = np.zeros(10) + w: Vector = rng.integers(0, 2, 10) if backend == "pd": X = pd.DataFrame(X) y = pd.Series(y) @@ -1122,9 +1122,9 @@ def test_validate_outcome_one_class(implementation, backend, rng): ) @pytest.mark.parametrize("backend", ["np", "pd", "csr", "pl"]) def test_validate_outcome_different_classes(implementation, backend, rng): - X = rng.standard_normal((4, 2)) - y = np.array([0, 1, 0, 0]) - w = np.array([0, 0, 1, 1]) + X: Matrix = rng.standard_normal((4, 2)) + y: Vector = np.array([0, 1, 0, 0]) + w: Vector = np.array([0, 0, 1, 1]) if backend == "pd": X = pd.DataFrame(X) y = pd.Series(y)