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

Generalize typing of numbers #1085

Closed
vlipovac opened this issue Dec 7, 2023 · 2 comments
Closed

Generalize typing of numbers #1085

vlipovac opened this issue Dec 7, 2023 · 2 comments
Assignees
Labels
style Typing and style changes with no impact on computations

Comments

@vlipovac
Copy link
Contributor

vlipovac commented Dec 7, 2023

The goal is to replace the usage of pp.numbers with numbers.Real using the standard lib numbers from Python.
The reason is to increase the coverage of precision types, see example below:

With
pp.numbers = Union[int, float]
we get
image

@vlipovac vlipovac added the implementation - short An issue that requires a short implementation effort. label Dec 7, 2023
@vlipovac vlipovac self-assigned this Dec 7, 2023
@vlipovac vlipovac added style Typing and style changes with no impact on computations and removed implementation - short An issue that requires a short implementation effort. labels Dec 7, 2023
@vlipovac
Copy link
Contributor Author

vlipovac commented Jan 18, 2024

I stumbled upon an issue with mypy (surprise). It does not support this built-in package.
There is/was an extensive discussion on their side python/mypy#3186.

Since this issue is not that crucial, you might want to consider closing it until it pops up or some compatible solution is found.

@OmarDuran
Copy link
Contributor

Thanks @vlipovac. Since this issue doesn't deal with anything essential, I'm closing it for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
style Typing and style changes with no impact on computations
Projects
None yet
Development

No branches or pull requests

2 participants