pmgbergen / porepy

Python Simulation Tool for Fractured and Deformable Porous Media

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Generalize typing of numbers

vlipovac opened this issue · comments

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

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.

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