-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
eb5d744
commit 6793bde
Showing
30 changed files
with
485 additions
and
294 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ authors = ["Julien Jean Malard-Adam <[email protected]>"] | |
license = "AGPL-v3.0" | ||
|
||
[tool.poetry.dependencies] | ||
python = "^3.9,<3.11" | ||
python = ">=3.10,<3.12" | ||
numpy = "^1.23.2" | ||
scipy = "^1.9.1" | ||
pandas = "^1.4.4" | ||
|
@@ -31,7 +31,14 @@ bibtexparser = "^1.2.0" | |
frozendict = "^2.3.4" | ||
|
||
[tool.poetry.group.dev.dependencies] | ||
mypy = "^0.971" | ||
mypy = {git = "https://github.com/python/mypy.git"} | ||
data-science-types = "^0.2.23" | ||
pyright = "^1.1.270" | ||
|
||
[tool.mypy] | ||
plugins = "numpy.typing.mypy_plugin" | ||
follow_imports = "silent" | ||
ignore_missing_imports = true | ||
|
||
[build-system] | ||
requires = ["poetry-core>=1.0.0"] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,8 +5,5 @@ | |
with open(resource_filename('tikon', 'versión.txt')) as archivo_versión: | ||
__versión__ = __version__ = archivo_versión.read().strip() | ||
|
||
# Numpy nos da un montón de errores que no nos importan en Tiko'n. | ||
np.warnings.filterwarnings('ignore') | ||
|
||
__autor__ = 'Julien Malard' | ||
__autor__ = 'Julien Malard-Adam' | ||
__correo__ = '[email protected]' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,38 @@ | ||
from typing import Optional | ||
|
||
from numpy.typing import ArrayLike | ||
from scipy.stats._distn_infrastructure import rv_continuous_frozen | ||
|
||
from .dists import DistAnalítica | ||
from .dists import líms_dist | ||
from .dists.utils import Líms_Con_None | ||
from .utils import líms_compat | ||
from ..tipos import Tipo_Valor_Numérico | ||
|
||
|
||
class APriori(object): | ||
def dist(símismo, líms): | ||
def dist(símismo, líms: Optional[Líms_Con_None]) -> DistAnalítica: | ||
raise NotImplementedError | ||
|
||
|
||
class APrioriDens(APriori): | ||
def __init__(símismo, rango, certidumbre): | ||
def __init__(símismo, rango: Optional[Líms_Con_None], certidumbre: Tipo_Valor_Numérico): | ||
símismo.rango = rango | ||
símismo.cert = certidumbre | ||
|
||
def dist(símismo, líms): | ||
def dist(símismo, líms: Optional[Líms_Con_None]) -> DistAnalítica: | ||
return DistAnalítica.de_dens(símismo.cert, símismo.rango, líms=líms) | ||
|
||
|
||
class APrioriDist(APriori): | ||
def __init__(símismo, dist): | ||
def __init__(símismo, dist: DistAnalítica | str | rv_continuous_frozen): | ||
símismo._dist = dist | ||
if isinstance(dist, DistAnalítica): | ||
símismo._líms_dist = dist.líms | ||
else: | ||
símismo._líms_dist = líms_dist(dist) | ||
|
||
def dist(símismo, líms): | ||
def dist(símismo, líms: Optional[Líms_Con_None]) -> DistAnalítica: | ||
líms_compat(símismo._líms_dist, líms) | ||
|
||
return símismo._dist if isinstance(símismo._dist, DistAnalítica) else DistAnalítica(símismo._dist) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
from .anlt import DistAnalítica | ||
from .dists import Dist, MnjdrDists | ||
from .dists import Dist, ManejadorDists | ||
from .trz import DistTraza | ||
from .utils import líms_dist, obt_nombre | ||
from .dibs import dibujar_dist |
Oops, something went wrong.