pyafv 0.3.3__cp39-cp39-macosx_10_9_x86_64.whl

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.
pyafv/__init__.py ADDED
@@ -0,0 +1,15 @@
1
+ from .physical_params import PhysicalParams, target_delta
2
+ from .simulator import FiniteVoronoiSimulator
3
+
4
+ from importlib.metadata import version, PackageNotFoundError
5
+
6
+ try:
7
+ __version__ = version("pyafv")
8
+ except PackageNotFoundError:
9
+ __version__ = "unknown" # package is not installed
10
+
11
+ __all__ = [
12
+ "PhysicalParams",
13
+ "FiniteVoronoiSimulator",
14
+ "target_delta",
15
+ ]
pyafv/backend.py ADDED
@@ -0,0 +1,16 @@
1
+ # chooses fast vs fallback implementation
2
+
3
+ try:
4
+ from . import finite_voronoi_fast as _impl
5
+ _BACKEND_NAME = "cython"
6
+ except ImportError: # pragma: no cover
7
+ _BACKEND_NAME = "python"
8
+ from . import finite_voronoi_fallback as _impl
9
+
10
+ # ---- for explicit API ----
11
+ backend_simulator = _impl.FiniteVoronoiSimulator
12
+
13
+ __all__ = [
14
+ "backend_simulator",
15
+ "_BACKEND_NAME",
16
+ ]
Binary file