sim-tools 1.0.0__tar.gz → 1.0.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {sim_tools-1.0.0 → sim_tools-1.0.2}/PKG-INFO +1 -1
- {sim_tools-1.0.0 → sim_tools-1.0.2}/sim_tools/__init__.py +2 -1
- {sim_tools-1.0.0 → sim_tools-1.0.2}/sim_tools/distributions.py +4 -1
- {sim_tools-1.0.0 → sim_tools-1.0.2}/.gitignore +0 -0
- {sim_tools-1.0.0 → sim_tools-1.0.2}/LICENSE +0 -0
- {sim_tools-1.0.0 → sim_tools-1.0.2}/README.md +0 -0
- {sim_tools-1.0.0 → sim_tools-1.0.2}/pyproject.toml +0 -0
- {sim_tools-1.0.0 → sim_tools-1.0.2}/sim_tools/_validation.py +0 -0
- {sim_tools-1.0.0 → sim_tools-1.0.2}/sim_tools/data/nspp_example1.csv +0 -0
- {sim_tools-1.0.0 → sim_tools-1.0.2}/sim_tools/datasets.py +0 -0
- {sim_tools-1.0.0 → sim_tools-1.0.2}/sim_tools/output_analysis.py +0 -0
- {sim_tools-1.0.0 → sim_tools-1.0.2}/sim_tools/ovs/__init__.py +0 -0
- {sim_tools-1.0.0 → sim_tools-1.0.2}/sim_tools/ovs/evaluation.py +0 -0
- {sim_tools-1.0.0 → sim_tools-1.0.2}/sim_tools/ovs/fixed_budget.py +0 -0
- {sim_tools-1.0.0 → sim_tools-1.0.2}/sim_tools/ovs/indifference_zone.py +0 -0
- {sim_tools-1.0.0 → sim_tools-1.0.2}/sim_tools/ovs/toy_models.py +0 -0
- {sim_tools-1.0.0 → sim_tools-1.0.2}/sim_tools/time_dependent.py +0 -0
- {sim_tools-1.0.0 → sim_tools-1.0.2}/sim_tools/trace.py +0 -0
|
@@ -99,6 +99,7 @@ from typing import (
|
|
|
99
99
|
List,
|
|
100
100
|
Dict,
|
|
101
101
|
runtime_checkable,
|
|
102
|
+
TypeVar,
|
|
102
103
|
)
|
|
103
104
|
|
|
104
105
|
import numpy as np
|
|
@@ -121,6 +122,8 @@ from sim_tools._validation import (
|
|
|
121
122
|
is_positive_array,
|
|
122
123
|
)
|
|
123
124
|
|
|
125
|
+
T = TypeVar("T", bound=type)
|
|
126
|
+
|
|
124
127
|
|
|
125
128
|
# pylint: disable=too-few-public-methods
|
|
126
129
|
@runtime_checkable
|
|
@@ -297,7 +300,7 @@ class DistributionRegistry:
|
|
|
297
300
|
Decorator function that registers the class
|
|
298
301
|
"""
|
|
299
302
|
|
|
300
|
-
def decorator(distribution_class:
|
|
303
|
+
def decorator(distribution_class: T) -> T:
|
|
301
304
|
nonlocal name
|
|
302
305
|
if name is None:
|
|
303
306
|
name = distribution_class.__name__
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|