pynamicalsys 1.2.1__tar.gz → 1.3.0__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.
Files changed (66) hide show
  1. {pynamicalsys-1.2.1 → pynamicalsys-1.3.0}/CHANGELOG.md +28 -5
  2. pynamicalsys-1.3.0/CONTRIBUTING.md +47 -0
  3. {pynamicalsys-1.2.1 → pynamicalsys-1.3.0}/PKG-INFO +24 -16
  4. {pynamicalsys-1.2.1 → pynamicalsys-1.3.0}/README.md +22 -15
  5. {pynamicalsys-1.2.1 → pynamicalsys-1.3.0}/pyproject.toml +1 -1
  6. {pynamicalsys-1.2.1 → pynamicalsys-1.3.0}/src/pynamicalsys/__version__.py +16 -3
  7. {pynamicalsys-1.2.1 → pynamicalsys-1.3.0}/src/pynamicalsys/common/utils.py +20 -21
  8. {pynamicalsys-1.2.1 → pynamicalsys-1.3.0}/src/pynamicalsys/continuous_time/chaotic_indicators.py +174 -78
  9. {pynamicalsys-1.2.1 → pynamicalsys-1.3.0}/src/pynamicalsys/continuous_time/numerical_integrators.py +1 -1
  10. {pynamicalsys-1.2.1 → pynamicalsys-1.3.0}/src/pynamicalsys/continuous_time/trajectory_analysis.py +58 -22
  11. {pynamicalsys-1.2.1 → pynamicalsys-1.3.0}/src/pynamicalsys/core/continuous_dynamical_systems.py +184 -11
  12. {pynamicalsys-1.2.1 → pynamicalsys-1.3.0}/src/pynamicalsys/core/discrete_dynamical_systems.py +264 -16
  13. {pynamicalsys-1.2.1 → pynamicalsys-1.3.0}/src/pynamicalsys/discrete_time/dynamical_indicators.py +407 -163
  14. {pynamicalsys-1.2.1 → pynamicalsys-1.3.0}/src/pynamicalsys/discrete_time/transport.py +74 -112
  15. {pynamicalsys-1.2.1 → pynamicalsys-1.3.0}/src/pynamicalsys/discrete_time/validators.py +1 -1
  16. {pynamicalsys-1.2.1 → pynamicalsys-1.3.0}/src/pynamicalsys.egg-info/PKG-INFO +24 -16
  17. {pynamicalsys-1.2.1 → pynamicalsys-1.3.0}/src/pynamicalsys.egg-info/SOURCES.txt +5 -1
  18. {pynamicalsys-1.2.1 → pynamicalsys-1.3.0}/src/pynamicalsys.egg-info/requires.txt +1 -0
  19. pynamicalsys-1.3.0/tests/continuous_time/test_SALI_and_LDI.ipynb +259 -0
  20. pynamicalsys-1.3.0/tests/continuous_time/test_lyapunov.ipynb +438 -0
  21. pynamicalsys-1.3.0/tests/continuous_time/test_trajectory.ipynb +443 -0
  22. pynamicalsys-1.3.0/tests/discrete-time/test_FTLE.ipynb +164 -0
  23. {pynamicalsys-1.2.1 → pynamicalsys-1.3.0}/tests/discrete-time/test_RTE.ipynb +2 -2
  24. pynamicalsys-1.3.0/tests/discrete-time/test_SALI.ipynb +153 -0
  25. {pynamicalsys-1.2.1 → pynamicalsys-1.3.0}/tests/discrete-time/test_bif_diagram.ipynb +3 -3
  26. {pynamicalsys-1.2.1 → pynamicalsys-1.3.0}/tests/discrete-time/test_chaotic_saddle.ipynb +3 -3
  27. {pynamicalsys-1.2.1 → pynamicalsys-1.3.0}/tests/discrete-time/test_dig.ipynb +2 -2
  28. pynamicalsys-1.3.0/tests/discrete-time/test_ensemble_statistics.ipynb +562 -0
  29. {pynamicalsys-1.2.1 → pynamicalsys-1.3.0}/tests/discrete-time/test_escape.ipynb +2 -2
  30. {pynamicalsys-1.2.1 → pynamicalsys-1.3.0}/tests/discrete-time/test_fractal_dimension.ipynb +3 -3
  31. {pynamicalsys-1.2.1 → pynamicalsys-1.3.0}/tests/discrete-time/test_hurst_exponent.ipynb +2 -2
  32. pynamicalsys-1.3.0/tests/discrete-time/test_lyapunov.ipynb +472 -0
  33. pynamicalsys-1.3.0/tests/discrete-time/test_lyapunov_exponents.ipynb +319 -0
  34. {pynamicalsys-1.2.1 → pynamicalsys-1.3.0}/tests/discrete-time/test_manifold.ipynb +2 -2
  35. {pynamicalsys-1.2.1 → pynamicalsys-1.3.0}/tests/discrete-time/test_manifolds.ipynb +3 -3
  36. {pynamicalsys-1.2.1 → pynamicalsys-1.3.0}/tests/discrete-time/test_period_counter.ipynb +2 -2
  37. {pynamicalsys-1.2.1 → pynamicalsys-1.3.0}/tests/discrete-time/test_phase_space.ipynb +2 -2
  38. pynamicalsys-1.3.0/tests/discrete-time/test_step.py +31 -0
  39. pynamicalsys-1.2.1/CONTRIBUTING.md +0 -47
  40. pynamicalsys-1.2.1/tests/continuous_time/test_SALI_and_LDI.ipynb +0 -237
  41. pynamicalsys-1.2.1/tests/continuous_time/test_lyapunov.ipynb +0 -332
  42. pynamicalsys-1.2.1/tests/continuous_time/test_trajectory.ipynb +0 -443
  43. pynamicalsys-1.2.1/tests/discrete-time/test_FTLE.ipynb +0 -101
  44. pynamicalsys-1.2.1/tests/discrete-time/test_lyapunov_exponents.ipynb +0 -473
  45. {pynamicalsys-1.2.1 → pynamicalsys-1.3.0}/.gitignore +0 -0
  46. {pynamicalsys-1.2.1 → pynamicalsys-1.3.0}/CITATION.cff +0 -0
  47. {pynamicalsys-1.2.1 → pynamicalsys-1.3.0}/LICENSE +0 -0
  48. {pynamicalsys-1.2.1 → pynamicalsys-1.3.0}/MANIFEST.in +0 -0
  49. {pynamicalsys-1.2.1 → pynamicalsys-1.3.0}/setup.cfg +0 -0
  50. {pynamicalsys-1.2.1 → pynamicalsys-1.3.0}/src/pynamicalsys/__init__.py +0 -0
  51. {pynamicalsys-1.2.1 → pynamicalsys-1.3.0}/src/pynamicalsys/common/__init__.py +0 -0
  52. {pynamicalsys-1.2.1 → pynamicalsys-1.3.0}/src/pynamicalsys/common/basin_analysis.py +0 -0
  53. {pynamicalsys-1.2.1 → pynamicalsys-1.3.0}/src/pynamicalsys/common/recurrence_quantification_analysis.py +0 -0
  54. {pynamicalsys-1.2.1 → pynamicalsys-1.3.0}/src/pynamicalsys/continuous_time/__init__.py +0 -0
  55. {pynamicalsys-1.2.1 → pynamicalsys-1.3.0}/src/pynamicalsys/continuous_time/models.py +0 -0
  56. {pynamicalsys-1.2.1 → pynamicalsys-1.3.0}/src/pynamicalsys/continuous_time/validators.py +0 -0
  57. {pynamicalsys-1.2.1 → pynamicalsys-1.3.0}/src/pynamicalsys/core/__init__.py +0 -0
  58. {pynamicalsys-1.2.1 → pynamicalsys-1.3.0}/src/pynamicalsys/core/basin_metrics.py +0 -0
  59. {pynamicalsys-1.2.1 → pynamicalsys-1.3.0}/src/pynamicalsys/core/plot_styler.py +0 -0
  60. {pynamicalsys-1.2.1 → pynamicalsys-1.3.0}/src/pynamicalsys/core/time_series_metrics.py +0 -0
  61. {pynamicalsys-1.2.1 → pynamicalsys-1.3.0}/src/pynamicalsys/discrete_time/__init__.py +0 -0
  62. {pynamicalsys-1.2.1 → pynamicalsys-1.3.0}/src/pynamicalsys/discrete_time/models.py +0 -0
  63. {pynamicalsys-1.2.1 → pynamicalsys-1.3.0}/src/pynamicalsys/discrete_time/trajectory_analysis.py +0 -0
  64. {pynamicalsys-1.2.1 → pynamicalsys-1.3.0}/src/pynamicalsys.egg-info/dependency_links.txt +0 -0
  65. {pynamicalsys-1.2.1 → pynamicalsys-1.3.0}/src/pynamicalsys.egg-info/top_level.txt +0 -0
  66. {pynamicalsys-1.2.1 → pynamicalsys-1.3.0}/tests/discrete-time/test_SALI.py +0 -0
@@ -5,7 +5,30 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
- ## [v1.2.1] - 2025-06-29
8
+ ## [v1.3.0] 2025-08-23
9
+
10
+ ### Added
11
+
12
+ - `DiscreteDynamicalSystem` class:
13
+ - `step` method: returns the next state of the system.
14
+ - `GALI` method: computes the generalized alignment index (GALI).
15
+
16
+ - `ContinuousDynamicalSystem` class:
17
+ - `GALI` method that computes the generalized alignment index (GALI).
18
+
19
+ ### Modified
20
+
21
+ - `DiscreteDynamicalSystem` class:
22
+ - Improved performance when checking sampling points by avoiding repeated searches in sample_times.
23
+ - Refactored the `lyapunov` method to allow computing only a subset of the Lyapunov spectrum.
24
+
25
+ - `ContinuousDynamicalSystem` class:
26
+ - Unified integration step logic (previously duplicated across methods like trajectory and lyapunov_exponents) into a single step function.
27
+ - Refactored the `lyapunov` method to allow computing only a subset of the Lyapunov spectrum.
28
+
29
+ [v1.3.0]: https://github.com/mrolims/pynamicalsys/compare/v1.2.2...v1.3.0
30
+
31
+ ## [v1.2.2] - 2025-06-29
9
32
 
10
33
  ### Added
11
34
 
@@ -16,11 +39,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
16
39
  - Lyapunov exponents calculation.
17
40
  - The smallest aligment index (SALI) and linear dependence index (LDI) for chaos detection.
18
41
 
19
- ## [v1.0.0] - 2025-06-16
42
+ [v1.2.2]: https://github.com/mrolims/pynamicalsys/compare/v1.0.0...v1.2.2
43
+
44
+ ## v1.0.0 - 2025-06-16
20
45
 
21
46
  ### Added
22
47
 
23
- - `DiscreteDynamicalSystems` class for simulating and analyzing discrete nonlinear dynamical systems:
48
+ - `DiscreteDynamicalSystem` class for simulating and analyzing discrete nonlinear dynamical systems:
24
49
  - Trajectory computation.
25
50
  - Chaotic indicators.
26
51
  - Fixed points, periodic orbits, and manifolds.
@@ -36,8 +61,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
36
61
 
37
62
  - `PlotStyler` utility class to globally configure and apply consistent styling for Matplotlib plots.
38
63
 
39
- ---
40
-
41
64
  <!-- Dummy heading to avoid ending on a transition -->
42
65
 
43
66
  ##
@@ -0,0 +1,47 @@
1
+ # Contributing to pynamicalsys
2
+
3
+ We appreciate your interest in contributing to pynamicalsys! Whether you're fixing a bug, suggesting an improvement, or adding a new feature, your help is welcome.
4
+
5
+ ## How to Contribute
6
+
7
+ 1. **Fork the Repository**
8
+ Create a personal copy of this repository.
9
+
10
+ 2. **Create a Feature Branch**
11
+ Use a descriptive branch name:
12
+
13
+ ```bash
14
+ $ git checkout -b fix-typo-in-readme
15
+ ```
16
+
17
+ 3. **Make Changes**
18
+
19
+ Follow the coding style and ensure existing functionality it not broken. Add tests if relevant.
20
+
21
+ 4. **Submit a Pull Request**
22
+
23
+ Push your branch and open a pull request on GitHub. Include a clear description of your changes.
24
+
25
+ 5. **Wait for Review**
26
+
27
+ We'll review your PR and may request changes or offer suggestions.
28
+
29
+ ## Coding Style
30
+
31
+ - Follow **PEP8** standards for Pycode code.
32
+ - Use **docstrings** (PEP257) for public classes, functions, and modules.
33
+ - Include **type hints** where appropriate.
34
+ - Keep commits clean and descriptive.
35
+
36
+ ## Bug Reports & Feature Requests
37
+
38
+ - Submit an [issue](https://github.com/mrolims/pynamicalsys/issues) to report bugs or suggest new features.
39
+ - Include steps to reproduce, error messages, or use cases when possible.
40
+
41
+ ## Code of Conduct
42
+
43
+ We strive to maintain a respectful and inclusive community. Please follow our [code of conduct](https://pynamicalsys.readthedocs.io/en/latest/) when interacting.
44
+
45
+ ## Thank You
46
+
47
+ Your contributions help improve the project and support the community — thank you!
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pynamicalsys
3
- Version: 1.2.1
3
+ Version: 1.3.0
4
4
  Summary: A Python toolkit for the analysis of dynamical systems
5
5
  Author-email: Matheus Rolim Sales <rolim.sales.m@gmail.com>
6
6
  License: GNU GENERAL PUBLIC LICENSE
@@ -689,6 +689,7 @@ Description-Content-Type: text/markdown
689
689
  Requires-Dist: numpy>=1.21
690
690
  Requires-Dist: matplotlib>=3.4
691
691
  Requires-Dist: numba>=0.55
692
+ Requires-Dist: scipy>=0.6
692
693
 
693
694
  # pynamicalsys: A Python toolkit for the analysis of dynamical systems
694
695
 
@@ -698,28 +699,28 @@ Requires-Dist: numba>=0.55
698
699
 
699
700
  ## Overview
700
701
 
701
- **pynamicalsys** is designed to provide a fast, flexible, and user-friendly environment for analyzing **nonlinear dynamical systems**. It is designed for students, researchers, educators, and enthusiasts who want to explore the world of chaos and dynamical systems. Beyond standard tools like trajectory generation and Lyapunov exponents calculation, pynamicalsys includes advanced features such as
702
+ **pynamicalsys** is designed to provide a fast, flexible, and user-friendly environment for analyzing **nonlinear dynamical systems**. It is intended for students, researchers, educators, and enthusiasts who want to explore the world of chaos and dynamical systems. Beyond standard tools like trajectory generation and Lyapunov exponents calculation, **pynamicalsys** includes advanced features such as
702
703
 
703
- - **Linear dependence index** for chaos detection.
704
- - **Recurrence plots** and recurrence time statistics.
705
- - Chaos indicators based on **weighted Birkhoff averages**.
706
- - Statistical measures of **diffusion and transport** in dynamical systems.
707
- - Computation of **periodic orbits**, their **stability** and their **manifolds**.
708
- - Basin metric for **quantifying** the structure of **basins of attraction**.
709
- - **Plot styling** for consistent and customizable visualizations.
704
+ - **Linear dependence index** for chaos detection.
705
+ - **Recurrence plots** and recurrence time statistics.
706
+ - Chaos indicators based on **weighted Birkhoff averages**.
707
+ - Statistical measures of **diffusion and transport** in dynamical systems.
708
+ - Computation of **periodic orbits**, their **stability** and their **manifolds**.
709
+ - Basin metric for **quantifying** the structure of **basins of attraction**.
710
+ - **Plot styling** for consistent and customizable visualizations.
710
711
 
711
- pynamicalsys is built on top of NumPy and Numba, ensuring high performance and efficiency. Thanks to Numba accelerated computation, pynamicalsys offers speedups up to **130x** compared to the original Python implementation of the algorithms. This makes it suitable for large-scale simulations and analyses.
712
+ **pynamicalsys** is built on top of NumPy and Numba, ensuring high performance and efficiency. Thanks to Numba accelerated computation, **pynamicalsys** offers speedups up to **130x** compared to the original Python implementation of the algorithms. This makes it suitable for large-scale simulations and analyses.
712
713
 
713
714
  ## Installation
714
715
 
715
716
  ### Prerequisites
716
717
 
717
- - Python 3.8 or higher
718
- - pip (Python package installer)
718
+ - Python 3.8 or higher
719
+ - pip (Python package installer)
719
720
 
720
721
  ### Install via PyPI
721
722
 
722
- To install the latest stable release, run:
723
+ To install the latest stable release, run in your command line:
723
724
 
724
725
  ```bash
725
726
  $ pip install pynamicalsys
@@ -727,6 +728,13 @@ $ pip install pynamicalsys
727
728
 
728
729
  > **Note:** On **Windows**, it is **strongly recommended** to use [Anaconda](https://www.anaconda.com). It simplifies dependency management and avoids potential issues with scientific libraries during installation. Be sure to run the command from the **Anaconda Prompt**, not from Command Prompt or PowerShell, to ensure the correct environment is activated.
729
730
 
731
+ ### Upgrade via PyPI
732
+
733
+ To upgrade your current version of **pynamicalsys** to the latest stable release, run in your command line:
734
+
735
+ ```bash
736
+ $ pip install pynamicalsys --upgrade
737
+ ```
730
738
 
731
739
  ### Install from source
732
740
 
@@ -761,19 +769,19 @@ Currently, our research paper is under review, but in the mean time, if you use
761
769
 
762
770
  ```bibtex
763
771
  @misc{pynamicalsys,
764
- title={pynamicalsys: A Python toolkit for the analysis of dynamical systems},
772
+ title={pynamicalsys: A Python toolkit for the analysis of dynamical systems},
765
773
  author={Matheus Rolim Sales and Leonardo Costa de Souza and Daniel Borin and Michele Mugnaine and José Danilo Szezech Jr. and Ricardo Luiz Viana and Iberê Luiz Caldas and Edson Denis Leonel and Chris G. Antonopoulos},
766
774
  year={2025},
767
775
  eprint={2506.14044},
768
776
  archivePrefix={arXiv},
769
777
  primaryClass={nlin.CD},
770
- url={https://arxiv.org/abs/2506.14044},
778
+ url={https://arxiv.org/abs/2506.14044},
771
779
  }
772
780
  ```
773
781
 
774
782
  ## Contributing
775
783
 
776
- We welcome contributions from the community! To get started, please see our Contributing Guidelines.
784
+ We welcome contributions from the community! To get started, please see our [Contributing Guidelines](https://pynamicalsys.readthedocs.io/en/latest/contributing.html).
777
785
 
778
786
  ## License
779
787
 
@@ -6,28 +6,28 @@
6
6
 
7
7
  ## Overview
8
8
 
9
- **pynamicalsys** is designed to provide a fast, flexible, and user-friendly environment for analyzing **nonlinear dynamical systems**. It is designed for students, researchers, educators, and enthusiasts who want to explore the world of chaos and dynamical systems. Beyond standard tools like trajectory generation and Lyapunov exponents calculation, pynamicalsys includes advanced features such as
9
+ **pynamicalsys** is designed to provide a fast, flexible, and user-friendly environment for analyzing **nonlinear dynamical systems**. It is intended for students, researchers, educators, and enthusiasts who want to explore the world of chaos and dynamical systems. Beyond standard tools like trajectory generation and Lyapunov exponents calculation, **pynamicalsys** includes advanced features such as
10
10
 
11
- - **Linear dependence index** for chaos detection.
12
- - **Recurrence plots** and recurrence time statistics.
13
- - Chaos indicators based on **weighted Birkhoff averages**.
14
- - Statistical measures of **diffusion and transport** in dynamical systems.
15
- - Computation of **periodic orbits**, their **stability** and their **manifolds**.
16
- - Basin metric for **quantifying** the structure of **basins of attraction**.
17
- - **Plot styling** for consistent and customizable visualizations.
11
+ - **Linear dependence index** for chaos detection.
12
+ - **Recurrence plots** and recurrence time statistics.
13
+ - Chaos indicators based on **weighted Birkhoff averages**.
14
+ - Statistical measures of **diffusion and transport** in dynamical systems.
15
+ - Computation of **periodic orbits**, their **stability** and their **manifolds**.
16
+ - Basin metric for **quantifying** the structure of **basins of attraction**.
17
+ - **Plot styling** for consistent and customizable visualizations.
18
18
 
19
- pynamicalsys is built on top of NumPy and Numba, ensuring high performance and efficiency. Thanks to Numba accelerated computation, pynamicalsys offers speedups up to **130x** compared to the original Python implementation of the algorithms. This makes it suitable for large-scale simulations and analyses.
19
+ **pynamicalsys** is built on top of NumPy and Numba, ensuring high performance and efficiency. Thanks to Numba accelerated computation, **pynamicalsys** offers speedups up to **130x** compared to the original Python implementation of the algorithms. This makes it suitable for large-scale simulations and analyses.
20
20
 
21
21
  ## Installation
22
22
 
23
23
  ### Prerequisites
24
24
 
25
- - Python 3.8 or higher
26
- - pip (Python package installer)
25
+ - Python 3.8 or higher
26
+ - pip (Python package installer)
27
27
 
28
28
  ### Install via PyPI
29
29
 
30
- To install the latest stable release, run:
30
+ To install the latest stable release, run in your command line:
31
31
 
32
32
  ```bash
33
33
  $ pip install pynamicalsys
@@ -35,6 +35,13 @@ $ pip install pynamicalsys
35
35
 
36
36
  > **Note:** On **Windows**, it is **strongly recommended** to use [Anaconda](https://www.anaconda.com). It simplifies dependency management and avoids potential issues with scientific libraries during installation. Be sure to run the command from the **Anaconda Prompt**, not from Command Prompt or PowerShell, to ensure the correct environment is activated.
37
37
 
38
+ ### Upgrade via PyPI
39
+
40
+ To upgrade your current version of **pynamicalsys** to the latest stable release, run in your command line:
41
+
42
+ ```bash
43
+ $ pip install pynamicalsys --upgrade
44
+ ```
38
45
 
39
46
  ### Install from source
40
47
 
@@ -69,19 +76,19 @@ Currently, our research paper is under review, but in the mean time, if you use
69
76
 
70
77
  ```bibtex
71
78
  @misc{pynamicalsys,
72
- title={pynamicalsys: A Python toolkit for the analysis of dynamical systems},
79
+ title={pynamicalsys: A Python toolkit for the analysis of dynamical systems},
73
80
  author={Matheus Rolim Sales and Leonardo Costa de Souza and Daniel Borin and Michele Mugnaine and José Danilo Szezech Jr. and Ricardo Luiz Viana and Iberê Luiz Caldas and Edson Denis Leonel and Chris G. Antonopoulos},
74
81
  year={2025},
75
82
  eprint={2506.14044},
76
83
  archivePrefix={arXiv},
77
84
  primaryClass={nlin.CD},
78
- url={https://arxiv.org/abs/2506.14044},
85
+ url={https://arxiv.org/abs/2506.14044},
79
86
  }
80
87
  ```
81
88
 
82
89
  ## Contributing
83
90
 
84
- We welcome contributions from the community! To get started, please see our Contributing Guidelines.
91
+ We welcome contributions from the community! To get started, please see our [Contributing Guidelines](https://pynamicalsys.readthedocs.io/en/latest/contributing.html).
85
92
 
86
93
  ## License
87
94
 
@@ -15,7 +15,7 @@ classifiers = [
15
15
  "Topic :: Software Development :: Libraries :: Python Modules",
16
16
  ]
17
17
 
18
- dependencies = ["numpy >=1.21", "matplotlib >=3.4", "numba >=0.55"]
18
+ dependencies = ["numpy >=1.21", "matplotlib >=3.4", "numba >=0.55", "scipy >=0.6"]
19
19
  requires-python = ">=3.8"
20
20
 
21
21
  [build-system]
@@ -1,7 +1,14 @@
1
1
  # file generated by setuptools-scm
2
2
  # don't change, don't track in version control
3
3
 
4
- __all__ = ["__version__", "__version_tuple__", "version", "version_tuple"]
4
+ __all__ = [
5
+ "__version__",
6
+ "__version_tuple__",
7
+ "version",
8
+ "version_tuple",
9
+ "__commit_id__",
10
+ "commit_id",
11
+ ]
5
12
 
6
13
  TYPE_CHECKING = False
7
14
  if TYPE_CHECKING:
@@ -9,13 +16,19 @@ if TYPE_CHECKING:
9
16
  from typing import Union
10
17
 
11
18
  VERSION_TUPLE = Tuple[Union[int, str], ...]
19
+ COMMIT_ID = Union[str, None]
12
20
  else:
13
21
  VERSION_TUPLE = object
22
+ COMMIT_ID = object
14
23
 
15
24
  version: str
16
25
  __version__: str
17
26
  __version_tuple__: VERSION_TUPLE
18
27
  version_tuple: VERSION_TUPLE
28
+ commit_id: COMMIT_ID
29
+ __commit_id__: COMMIT_ID
19
30
 
20
- __version__ = version = '1.2.1'
21
- __version_tuple__ = version_tuple = (1, 2, 1)
31
+ __version__ = version = '1.3.0'
32
+ __version_tuple__ = version_tuple = (1, 3, 0)
33
+
34
+ __commit_id__ = commit_id = 'g138b5d22a'
@@ -257,7 +257,7 @@ def finite_difference_jacobian(
257
257
 
258
258
 
259
259
  @njit
260
- def wedge_product_norm(vectors: NDArray[np.float64]) -> float:
260
+ def wedge_norm_2(vectors: NDArray[np.float64]) -> float:
261
261
  """
262
262
  Computes the norm of the wedge product of n m-dimensional vectors using the Gram determinant.
263
263
 
@@ -295,6 +295,25 @@ def wedge_product_norm(vectors: NDArray[np.float64]) -> float:
295
295
  return norm
296
296
 
297
297
 
298
+ def wedge_norm(V: NDArray[np.float64]) -> float:
299
+ """
300
+ Computes the norm of the wedge product of k d-dimensional vectors using the Gram determinant.
301
+
302
+ Parameters:
303
+ vectors : NDArray[np.float64]
304
+ A (d, k) array where d is the dimension and k is the number of vectors.
305
+
306
+ Returns:
307
+ norm : float
308
+ The norm (magnitude) of the wedge product.
309
+ """
310
+ G = V.T @ V # Gram matrix, shape (k, k)
311
+
312
+ det = np.linalg.det(G)
313
+
314
+ return 0 if det < 0 else np.sqrt(det)
315
+
316
+
298
317
  @njit
299
318
  def _coeff_mat(x: NDArray[np.float64], deg: int) -> NDArray[np.float64]:
300
319
  mat_ = np.zeros(shape=(x.shape[0], deg + 1))
@@ -322,23 +341,3 @@ def fit_poly(
322
341
  p = _fit_x(a, y)
323
342
  # Reverse order so p[0] is coefficient of highest order
324
343
  return p[::-1]
325
-
326
-
327
- if __name__ == "__main__":
328
-
329
- v = np.random.rand(2, 2)
330
- w = v.copy()
331
-
332
- q, r = qr(v)
333
- print("Q:\n", q)
334
- print("R:\n", r)
335
- print("QR Product:\n", np.dot(q, r))
336
- print("Original Matrix:\n", v)
337
-
338
- print()
339
-
340
- q, r = householder_qr(v)
341
- print("Q:\n", q)
342
- print("R:\n", r)
343
- print("QR Product:\n", np.dot(q, r))
344
- print("Original Matrix:\n", v)