Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dtypes is deprecated/removed in polars 0.20.31 #41

Merged
merged 7 commits into from
Jun 19, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
"df = pl.read_csv(\n",
" source=titanic_path,\n",
" try_parse_dates=True,\n",
" dtypes={\"Sex\": pl.Categorical, \"Embarked\": pl.Categorical},\n",
" schema_overrides={\"Sex\": pl.Categorical, \"Embarked\": pl.Categorical},\n",
")\n",
"df.head()"
]
Expand Down
2 changes: 1 addition & 1 deletion metasyncontrib/disclosure/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class DisclosureConstantMixin(BaseDistribution):
"""Mixin class to overload fit method for constant distributions."""

@classmethod
def fit(cls, series, *args, partition_size: int = 11, **kwargs) -> BaseDistribution:
def fit(cls, series, *args, partition_size: int = 11, **kwargs) -> BaseDistribution: #pylint: disable=unused-argument
"""Fit constant distributions with disclosure control rules in place."""
# NB: dominance rule ensures that constant distribution is essentially never
# allowed under formal disclosure control. Always return default distribution.
Expand Down
6 changes: 5 additions & 1 deletion metasyncontrib/disclosure/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@

import numpy as np
import polars as pl
from numpy.core._exceptions import UFuncTypeError

try:
from numpy.core._exceptions import UFuncTypeError # type: ignore
except ImportError:
from numpy._core._exceptions import UFuncTypeError # type: ignore


def _compute_dominance(block_values, reverse=False):
Expand Down
Loading