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

[dtype] Make learn_rounding_digits() work with new pandas dtypes #858

Closed
R-Palazzo opened this issue Aug 2, 2024 · 0 comments · Fixed by #859
Closed

[dtype] Make learn_rounding_digits() work with new pandas dtypes #858

R-Palazzo opened this issue Aug 2, 2024 · 0 comments · Fixed by #859
Assignees
Labels
maintenance Task related to infrastructure & dependencies
Milestone

Comments

@R-Palazzo
Copy link
Contributor

Problem Description

Currently, learn_rounding_digits() crashes with the new pandas dtypes on python 3.8. Running this code:

import pandas as pd
from rdt.transformers.utils import learn_rounding_digits

data = pd.Series([1.1, 2.2, 3.3], dtype='Float64')

learn_rounding_digits(data)

Raises the following error:
TypeError: ufunc 'isinf' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''

Expected behavior

The method should work with any numerical dtype on every python version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Task related to infrastructure & dependencies
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant