c4dynamics 2.3.1__tar.gz → 2.3.4__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 (81) hide show
  1. {c4dynamics-2.3.1/c4dynamics.egg-info → c4dynamics-2.3.4}/PKG-INFO +92 -35
  2. c4dynamics-2.3.1/PKG-INFO → c4dynamics-2.3.4/README.md +52 -50
  3. {c4dynamics-2.3.1 → c4dynamics-2.3.4}/c4dynamics/__init__.py +1 -1
  4. {c4dynamics-2.3.1 → c4dynamics-2.3.4}/c4dynamics/datasets/_manager.py +11 -5
  5. {c4dynamics-2.3.1 → c4dynamics-2.3.4}/c4dynamics/detectors/yolo3_opencv.py +22 -4
  6. c4dynamics-2.3.4/c4dynamics/envs/mountain_car.py +880 -0
  7. {c4dynamics-2.3.1 → c4dynamics-2.3.4}/c4dynamics/filters/kalman.py +1 -1
  8. {c4dynamics-2.3.1 → c4dynamics-2.3.4}/c4dynamics/sensors/radar.py +1 -1
  9. {c4dynamics-2.3.1 → c4dynamics-2.3.4}/c4dynamics/sensors/seeker.py +2 -2
  10. {c4dynamics-2.3.1 → c4dynamics-2.3.4}/c4dynamics/states/lib/pixelpoint.py +23 -7
  11. {c4dynamics-2.3.1 → c4dynamics-2.3.4}/c4dynamics/states/state.py +34 -28
  12. {c4dynamics-2.3.1 → c4dynamics-2.3.4}/c4dynamics/utils/gen_gif.py +8 -3
  13. c4dynamics-2.3.1/README.md → c4dynamics-2.3.4/c4dynamics.egg-info/PKG-INFO +107 -24
  14. c4dynamics-2.3.4/c4dynamics.egg-info/requires.txt +45 -0
  15. c4dynamics-2.3.4/pyproject.toml +51 -0
  16. c4dynamics-2.3.4/setup.py +63 -0
  17. {c4dynamics-2.3.1 → c4dynamics-2.3.4}/tests/test_animate.py +1 -0
  18. {c4dynamics-2.3.1 → c4dynamics-2.3.4}/tests/test_gen_gif.py +8 -1
  19. {c4dynamics-2.3.1 → c4dynamics-2.3.4}/tests/test_plotdefaults.py +1 -2
  20. {c4dynamics-2.3.1 → c4dynamics-2.3.4}/tests/test_radar.py +2 -2
  21. {c4dynamics-2.3.1 → c4dynamics-2.3.4}/tests/test_state.py +36 -3
  22. {c4dynamics-2.3.1 → c4dynamics-2.3.4}/tests/test_state_assignment.py +2 -2
  23. {c4dynamics-2.3.1 → c4dynamics-2.3.4}/tests/test_state_assignment_strict.py +2 -2
  24. {c4dynamics-2.3.1 → c4dynamics-2.3.4}/tests/test_yolov3_opencv.py +12 -3
  25. c4dynamics-2.3.1/c4dynamics/envs/mountain_car.py +0 -477
  26. c4dynamics-2.3.1/c4dynamics.egg-info/requires.txt +0 -13
  27. c4dynamics-2.3.1/pyproject.toml +0 -35
  28. c4dynamics-2.3.1/setup.py +0 -69
  29. {c4dynamics-2.3.1 → c4dynamics-2.3.4}/LICENSE +0 -0
  30. {c4dynamics-2.3.1 → c4dynamics-2.3.4}/c4dynamics/datasets/__init__.py +0 -0
  31. {c4dynamics-2.3.1 → c4dynamics-2.3.4}/c4dynamics/datasets/_registry.py +0 -0
  32. {c4dynamics-2.3.1 → c4dynamics-2.3.4}/c4dynamics/detectors/__init__.py +0 -0
  33. {c4dynamics-2.3.1 → c4dynamics-2.3.4}/c4dynamics/envs/__init__.py +0 -0
  34. {c4dynamics-2.3.1 → c4dynamics-2.3.4}/c4dynamics/eqm/__init__.py +0 -0
  35. {c4dynamics-2.3.1 → c4dynamics-2.3.4}/c4dynamics/eqm/derivs.py +0 -0
  36. {c4dynamics-2.3.1 → c4dynamics-2.3.4}/c4dynamics/eqm/integrate.py +0 -0
  37. {c4dynamics-2.3.1 → c4dynamics-2.3.4}/c4dynamics/filters/__init__.py +0 -0
  38. {c4dynamics-2.3.1 → c4dynamics-2.3.4}/c4dynamics/filters/ekf.py +0 -0
  39. {c4dynamics-2.3.1 → c4dynamics-2.3.4}/c4dynamics/filters/lowpass.py +0 -0
  40. {c4dynamics-2.3.1 → c4dynamics-2.3.4}/c4dynamics/rotmat/__init__.py +0 -0
  41. {c4dynamics-2.3.1 → c4dynamics-2.3.4}/c4dynamics/rotmat/animate.py +0 -0
  42. {c4dynamics-2.3.1 → c4dynamics-2.3.4}/c4dynamics/rotmat/rotmat.py +0 -0
  43. {c4dynamics-2.3.1 → c4dynamics-2.3.4}/c4dynamics/sensors/__init__.py +0 -0
  44. {c4dynamics-2.3.1 → c4dynamics-2.3.4}/c4dynamics/sensors/lineofsight.py +0 -0
  45. {c4dynamics-2.3.1 → c4dynamics-2.3.4}/c4dynamics/states/__init__.py +0 -0
  46. {c4dynamics-2.3.1 → c4dynamics-2.3.4}/c4dynamics/states/lib/__init__.py +0 -0
  47. {c4dynamics-2.3.1 → c4dynamics-2.3.4}/c4dynamics/states/lib/datapoint.py +0 -0
  48. {c4dynamics-2.3.1 → c4dynamics-2.3.4}/c4dynamics/states/lib/rigidbody.py +0 -0
  49. {c4dynamics-2.3.1 → c4dynamics-2.3.4}/c4dynamics/utils/__init__.py +0 -0
  50. {c4dynamics-2.3.1 → c4dynamics-2.3.4}/c4dynamics/utils/_struct.py +0 -0
  51. {c4dynamics-2.3.1 → c4dynamics-2.3.4}/c4dynamics/utils/const.py +0 -0
  52. {c4dynamics-2.3.1 → c4dynamics-2.3.4}/c4dynamics/utils/cprint.py +0 -0
  53. {c4dynamics-2.3.1 → c4dynamics-2.3.4}/c4dynamics/utils/idx2keys.py +0 -0
  54. {c4dynamics-2.3.1 → c4dynamics-2.3.4}/c4dynamics/utils/images_loader.py +0 -0
  55. {c4dynamics-2.3.1 → c4dynamics-2.3.4}/c4dynamics/utils/math.py +0 -0
  56. {c4dynamics-2.3.1 → c4dynamics-2.3.4}/c4dynamics/utils/plottools.py +0 -0
  57. {c4dynamics-2.3.1 → c4dynamics-2.3.4}/c4dynamics/utils/plottracks.py +0 -0
  58. {c4dynamics-2.3.1 → c4dynamics-2.3.4}/c4dynamics/utils/printpts.py +0 -0
  59. {c4dynamics-2.3.1 → c4dynamics-2.3.4}/c4dynamics/utils/slides_gen.py +0 -0
  60. {c4dynamics-2.3.1 → c4dynamics-2.3.4}/c4dynamics/utils/tictoc.py +0 -0
  61. {c4dynamics-2.3.1 → c4dynamics-2.3.4}/c4dynamics/utils/video_gen.py +0 -0
  62. {c4dynamics-2.3.1 → c4dynamics-2.3.4}/c4dynamics/utils/vidgen.py +0 -0
  63. {c4dynamics-2.3.1 → c4dynamics-2.3.4}/c4dynamics.egg-info/SOURCES.txt +0 -0
  64. {c4dynamics-2.3.1 → c4dynamics-2.3.4}/c4dynamics.egg-info/dependency_links.txt +0 -0
  65. {c4dynamics-2.3.1 → c4dynamics-2.3.4}/c4dynamics.egg-info/top_level.txt +0 -0
  66. {c4dynamics-2.3.1 → c4dynamics-2.3.4}/setup.cfg +0 -0
  67. {c4dynamics-2.3.1 → c4dynamics-2.3.4}/tests/test_const.py +0 -0
  68. {c4dynamics-2.3.1 → c4dynamics-2.3.4}/tests/test_cprint.py +0 -0
  69. {c4dynamics-2.3.1 → c4dynamics-2.3.4}/tests/test_datapoint.py +0 -0
  70. {c4dynamics-2.3.1 → c4dynamics-2.3.4}/tests/test_datasets.py +0 -0
  71. {c4dynamics-2.3.1 → c4dynamics-2.3.4}/tests/test_derivs.py +0 -0
  72. {c4dynamics-2.3.1 → c4dynamics-2.3.4}/tests/test_ekf.py +0 -0
  73. {c4dynamics-2.3.1 → c4dynamics-2.3.4}/tests/test_integrate.py +0 -0
  74. {c4dynamics-2.3.1 → c4dynamics-2.3.4}/tests/test_kalman.py +0 -0
  75. {c4dynamics-2.3.1 → c4dynamics-2.3.4}/tests/test_lowpass.py +0 -0
  76. {c4dynamics-2.3.1 → c4dynamics-2.3.4}/tests/test_math.py +0 -0
  77. {c4dynamics-2.3.1 → c4dynamics-2.3.4}/tests/test_pixelpoint.py +0 -0
  78. {c4dynamics-2.3.1 → c4dynamics-2.3.4}/tests/test_rigidbody.py +0 -0
  79. {c4dynamics-2.3.1 → c4dynamics-2.3.4}/tests/test_rotmat.py +0 -0
  80. {c4dynamics-2.3.1 → c4dynamics-2.3.4}/tests/test_seeker.py +0 -0
  81. {c4dynamics-2.3.1 → c4dynamics-2.3.4}/tests/test_tictoc.py +0 -0
@@ -1,25 +1,54 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: c4dynamics
3
- Version: 2.3.1
3
+ Version: 2.3.4
4
4
  Summary: Python framework for state-space modeling and algorithm development
5
5
  Author: c4dynamics
6
6
  Author-email: Ziv Meri <zivmeri@gmail.com>
7
- License: MIT
7
+ License-Expression: MIT
8
8
  Requires-Python: >=3.8,<3.13
9
9
  Description-Content-Type: text/markdown
10
10
  License-File: LICENSE
11
- Requires-Dist: imageio>=2.37.0
12
- Requires-Dist: matplotlib>=3.10.3
13
- Requires-Dist: natsort>=8.4.0
14
- Requires-Dist: numpy>=2.3.1
15
- Requires-Dist: opencv-python>=4.11.0.86
16
- Requires-Dist: pooch>=1.8.2
17
- Requires-Dist: scipy>=1.16.0
11
+ Requires-Dist: matplotlib>=3.9.2
12
+ Requires-Dist: numpy>=1.26.0
13
+ Requires-Dist: pooch>=1.8.0
14
+ Requires-Dist: scipy>=1.13.0
15
+ Provides-Extra: vision
16
+ Requires-Dist: matplotlib>=3.9.2; extra == "vision"
17
+ Requires-Dist: numpy>=1.26.0; extra == "vision"
18
+ Requires-Dist: pooch>=1.8.0; extra == "vision"
19
+ Requires-Dist: scipy>=1.13.0; extra == "vision"
20
+ Requires-Dist: imageio>=2.37.0; extra == "vision"
21
+ Requires-Dist: natsort>=8.3.1; extra == "vision"
22
+ Requires-Dist: opencv-python>=4.11.0.86; extra == "vision"
18
23
  Provides-Extra: dev
19
- Requires-Dist: nbsphinx>=0.9.7; extra == "dev"
20
- Requires-Dist: Sphinx>=8.1.3; extra == "dev"
24
+ Requires-Dist: matplotlib>=3.9.2; extra == "dev"
25
+ Requires-Dist: numpy>=1.26.0; extra == "dev"
26
+ Requires-Dist: pooch>=1.8.0; extra == "dev"
27
+ Requires-Dist: scipy>=1.13.0; extra == "dev"
28
+ Requires-Dist: imageio>=2.37.0; extra == "dev"
29
+ Requires-Dist: natsort>=8.3.1; extra == "dev"
30
+ Requires-Dist: opencv-python>=4.11.0.86; extra == "dev"
31
+ Requires-Dist: coverage>=7.0.0; extra == "dev"
32
+ Requires-Dist: nbsphinx>=0.9.3; extra == "dev"
33
+ Requires-Dist: sphinx>=8.1.3; extra == "dev"
21
34
  Requires-Dist: sphinx-book-theme>=1.1.4; extra == "dev"
22
35
  Requires-Dist: sphinx_design>=0.6.1; extra == "dev"
36
+ Provides-Extra: keywords
37
+ Requires-Dist: python; extra == "keywords"
38
+ Requires-Dist: state-space; extra == "keywords"
39
+ Requires-Dist: dynamics; extra == "keywords"
40
+ Requires-Dist: physics; extra == "keywords"
41
+ Requires-Dist: algorithms; extra == "keywords"
42
+ Requires-Dist: control; extra == "keywords"
43
+ Requires-Dist: navigation; extra == "keywords"
44
+ Requires-Dist: guidance; extra == "keywords"
45
+ Requires-Dist: slam; extra == "keywords"
46
+ Requires-Dist: vslam; extra == "keywords"
47
+ Requires-Dist: computer-vision; extra == "keywords"
48
+ Requires-Dist: image-processing; extra == "keywords"
49
+ Requires-Dist: signal-processing; extra == "keywords"
50
+ Provides-Extra: dynamic
51
+ Requires-Dist: classifiers; extra == "dynamic"
23
52
  Dynamic: author
24
53
  Dynamic: license-file
25
54
  Dynamic: requires-python
@@ -30,6 +59,27 @@ Dynamic: requires-python
30
59
 
31
60
 
32
61
 
62
+
63
+
64
+ <div align="center">
65
+ <strong>📄 Published in the Journal of Open Source Software (JOSS)</strong><br>
66
+ <em>A peer-reviewed open-source framework for state-space modeling and algorithm development</em>
67
+ <br>
68
+ <a href="https://doi.org/10.5281/zenodo.17931207">
69
+ <img src="https://zenodo.org/badge/DOI/10.5281/zenodo.17931207.svg">
70
+ </a>
71
+ <br>
72
+ <a href="https://doi.org/10.21105/joss.08776">
73
+ <img src="https://joss.theoj.org/papers/10.21105/joss.08776/status.svg">
74
+ </a>
75
+ </div>
76
+
77
+ <br>
78
+
79
+
80
+
81
+
82
+
33
83
  # Tsipor Dynamics
34
84
 
35
85
  ## Algorithms Engineering and Development
@@ -50,9 +100,24 @@ Tsipor (bird) Dynamics (c4dynamics) is the Python framework for state-space mode
50
100
  ![Pepy Total Downloads](https://img.shields.io/pepy/dt/c4dynamics?style=for-the-badge&color=blue%20&link=https%3A%2F%2Fpepy.tech%2Fprojects%2Fc4dynamics%3FtimeRange%3DthreeMonths%26category%3Dversion%26includeCIDownloads%3Dtrue%26granularity%3Ddaily%26viewType%3Dline%26versions%3D2.0.3%252C2.0.1%252C2.0.0)
51
101
 
52
102
 
103
+ ## About c4dynamics
53
104
 
105
+ **c4dynamics** is designed to
106
+ simplify the development of algorithms for dynamic systems,
107
+ using state space representations.
108
+ It offers engineers and researchers a systematic approach to model,
109
+ simulate, and control systems in fields like
110
+ ``robotics, aerospace,`` and ``navigation``.
54
111
 
55
- [Documentation](https://c4dynamics.github.io/c4dynamics/)
112
+ The framework introduces ``state objects,`` which are foundational
113
+ data structures that encapsulate state vectors and provide
114
+ the tools for managing data, simulating system behavior,
115
+ and analyzing results.
116
+
117
+ With integrated modules for sensors,
118
+ detectors, and filters,
119
+ c4dynamics accelerates algorithm development
120
+ while maintaining flexibility and scalability.
56
121
 
57
122
 
58
123
  ## Why c4dynamics?
@@ -71,24 +136,15 @@ Tsipor (bird) Dynamics (c4dynamics) is the Python framework for state-space mode
71
136
 
72
137
 
73
138
 
139
+ ## Documentation
74
140
 
75
- **c4dynamics** is designed to
76
- simplify the development of algorithms for dynamic systems,
77
- using state space representations.
78
- It offers engineers and researchers a systematic approach to model,
79
- simulate, and control systems in fields like
80
- ``robotics, aerospace,`` and ``navigation``.
81
-
82
- The framework introduces ``state objects,`` which are foundational
83
- data structures that encapsulate state vectors and provide
84
- the tools for managing data, simulating system behavior,
85
- and analyzing results.
86
-
87
- With integrated modules for sensors,
88
- detectors, and filters,
89
- c4dynamics accelerates algorithm development
90
- while maintaining flexibility and scalability.
141
+ 📘 **Full documentation:**
142
+ https://c4dynamics.github.io/c4dynamics/
91
143
 
144
+ - Installation and setup guides
145
+ - Core concepts and state-space modeling philosophy
146
+ - API reference and examples
147
+ - Tutorials for filtering, sensing, and simulation workflows
92
148
 
93
149
 
94
150
  ## Requirements
@@ -117,24 +173,25 @@ To run the latest GitHub version, download the repo and install required package
117
173
  >>> pip install -r requirements.txt
118
174
  ```
119
175
 
120
-
121
-
122
-
123
176
 
124
177
  ## Quickstart
125
178
 
126
179
  Import c4dynamics:
127
- ```
180
+ ```python
128
181
  >>> import c4dynamics as c4d
129
182
  ```
130
183
 
131
184
  Define state space object of two variables in the state space (y, vy) with initial conditions (change the state with your variables):
132
- ```
185
+ ```python
133
186
  >>> s = c4d.state(y = 1, vy = 0.5)
134
187
  ```
188
+ Store with time stamp `t = 0`:
189
+ ```python
190
+ >>> s.store(t = 0)
191
+ ```
135
192
 
136
193
  Multiply the state vector by a matrix and store:
137
- ```
194
+ ```python
138
195
  >>> F = [[1, 1],
139
196
  [0, 1]]
140
197
  >>> s.X += F @ s.X
@@ -142,7 +199,7 @@ Multiply the state vector by a matrix and store:
142
199
  ```
143
200
 
144
201
  Print the state variables, the state vector, and the stored data:
145
- ```
202
+ ```python
146
203
  >>> print(s)
147
204
  [ y vy ]
148
205
  >>> s.X
@@ -1,35 +1,30 @@
1
- Metadata-Version: 2.4
2
- Name: c4dynamics
3
- Version: 2.3.1
4
- Summary: Python framework for state-space modeling and algorithm development
5
- Author: c4dynamics
6
- Author-email: Ziv Meri <zivmeri@gmail.com>
7
- License: MIT
8
- Requires-Python: >=3.8,<3.13
9
- Description-Content-Type: text/markdown
10
- License-File: LICENSE
11
- Requires-Dist: imageio>=2.37.0
12
- Requires-Dist: matplotlib>=3.10.3
13
- Requires-Dist: natsort>=8.4.0
14
- Requires-Dist: numpy>=2.3.1
15
- Requires-Dist: opencv-python>=4.11.0.86
16
- Requires-Dist: pooch>=1.8.2
17
- Requires-Dist: scipy>=1.16.0
18
- Provides-Extra: dev
19
- Requires-Dist: nbsphinx>=0.9.7; extra == "dev"
20
- Requires-Dist: Sphinx>=8.1.3; extra == "dev"
21
- Requires-Dist: sphinx-book-theme>=1.1.4; extra == "dev"
22
- Requires-Dist: sphinx_design>=0.6.1; extra == "dev"
23
- Dynamic: author
24
- Dynamic: license-file
25
- Dynamic: requires-python
26
-
27
1
  <div align="center">
28
2
  <img src="https://github.com/C4dynamics/C4dynamics/blob/main/docs/source/_icon/c4dlogotext.svg">
29
3
  </div>
30
4
 
31
5
 
32
6
 
7
+
8
+
9
+ <div align="center">
10
+ <strong>📄 Published in the Journal of Open Source Software (JOSS)</strong><br>
11
+ <em>A peer-reviewed open-source framework for state-space modeling and algorithm development</em>
12
+ <br>
13
+ <a href="https://doi.org/10.5281/zenodo.17931207">
14
+ <img src="https://zenodo.org/badge/DOI/10.5281/zenodo.17931207.svg">
15
+ </a>
16
+ <br>
17
+ <a href="https://doi.org/10.21105/joss.08776">
18
+ <img src="https://joss.theoj.org/papers/10.21105/joss.08776/status.svg">
19
+ </a>
20
+ </div>
21
+
22
+ <br>
23
+
24
+
25
+
26
+
27
+
33
28
  # Tsipor Dynamics
34
29
 
35
30
  ## Algorithms Engineering and Development
@@ -50,9 +45,24 @@ Tsipor (bird) Dynamics (c4dynamics) is the Python framework for state-space mode
50
45
  ![Pepy Total Downloads](https://img.shields.io/pepy/dt/c4dynamics?style=for-the-badge&color=blue%20&link=https%3A%2F%2Fpepy.tech%2Fprojects%2Fc4dynamics%3FtimeRange%3DthreeMonths%26category%3Dversion%26includeCIDownloads%3Dtrue%26granularity%3Ddaily%26viewType%3Dline%26versions%3D2.0.3%252C2.0.1%252C2.0.0)
51
46
 
52
47
 
48
+ ## About c4dynamics
53
49
 
50
+ **c4dynamics** is designed to
51
+ simplify the development of algorithms for dynamic systems,
52
+ using state space representations.
53
+ It offers engineers and researchers a systematic approach to model,
54
+ simulate, and control systems in fields like
55
+ ``robotics, aerospace,`` and ``navigation``.
54
56
 
55
- [Documentation](https://c4dynamics.github.io/c4dynamics/)
57
+ The framework introduces ``state objects,`` which are foundational
58
+ data structures that encapsulate state vectors and provide
59
+ the tools for managing data, simulating system behavior,
60
+ and analyzing results.
61
+
62
+ With integrated modules for sensors,
63
+ detectors, and filters,
64
+ c4dynamics accelerates algorithm development
65
+ while maintaining flexibility and scalability.
56
66
 
57
67
 
58
68
  ## Why c4dynamics?
@@ -71,24 +81,15 @@ Tsipor (bird) Dynamics (c4dynamics) is the Python framework for state-space mode
71
81
 
72
82
 
73
83
 
84
+ ## Documentation
74
85
 
75
- **c4dynamics** is designed to
76
- simplify the development of algorithms for dynamic systems,
77
- using state space representations.
78
- It offers engineers and researchers a systematic approach to model,
79
- simulate, and control systems in fields like
80
- ``robotics, aerospace,`` and ``navigation``.
81
-
82
- The framework introduces ``state objects,`` which are foundational
83
- data structures that encapsulate state vectors and provide
84
- the tools for managing data, simulating system behavior,
85
- and analyzing results.
86
-
87
- With integrated modules for sensors,
88
- detectors, and filters,
89
- c4dynamics accelerates algorithm development
90
- while maintaining flexibility and scalability.
86
+ 📘 **Full documentation:**
87
+ https://c4dynamics.github.io/c4dynamics/
91
88
 
89
+ - Installation and setup guides
90
+ - Core concepts and state-space modeling philosophy
91
+ - API reference and examples
92
+ - Tutorials for filtering, sensing, and simulation workflows
92
93
 
93
94
 
94
95
  ## Requirements
@@ -117,24 +118,25 @@ To run the latest GitHub version, download the repo and install required package
117
118
  >>> pip install -r requirements.txt
118
119
  ```
119
120
 
120
-
121
-
122
-
123
121
 
124
122
  ## Quickstart
125
123
 
126
124
  Import c4dynamics:
127
- ```
125
+ ```python
128
126
  >>> import c4dynamics as c4d
129
127
  ```
130
128
 
131
129
  Define state space object of two variables in the state space (y, vy) with initial conditions (change the state with your variables):
132
- ```
130
+ ```python
133
131
  >>> s = c4d.state(y = 1, vy = 0.5)
134
132
  ```
133
+ Store with time stamp `t = 0`:
134
+ ```python
135
+ >>> s.store(t = 0)
136
+ ```
135
137
 
136
138
  Multiply the state vector by a matrix and store:
137
- ```
139
+ ```python
138
140
  >>> F = [[1, 1],
139
141
  [0, 1]]
140
142
  >>> s.X += F @ s.X
@@ -142,7 +144,7 @@ Multiply the state vector by a matrix and store:
142
144
  ```
143
145
 
144
146
  Print the state variables, the state vector, and the stored data:
145
- ```
147
+ ```python
146
148
  >>> print(s)
147
149
  [ y vy ]
148
150
  >>> s.X
@@ -83,7 +83,7 @@ from . import envs
83
83
  #
84
84
  # version
85
85
  ##
86
- __version__ = '2.3.1' # update also in pyproject.toml
86
+ __version__ = '2.3.4' # update also in pyproject.toml & setup.py
87
87
 
88
88
 
89
89
  #
@@ -573,20 +573,26 @@ def sha256(filename: str) -> str:
573
573
  if __name__ == "__main__":
574
574
 
575
575
 
576
+ current_module = sys.modules[__name__]
576
577
 
577
578
  try:
578
579
  import open3d as o3d # OPEN3D AVAILABLE
579
-
580
580
  except ImportError: # OPEN3D UNAVAILABLE
581
581
  # remove the doctests for d3_model if open3d is not available
582
-
583
- current_module = sys.modules[__name__]
584
582
  if hasattr(current_module, "d3_model"):
585
583
  current_module.d3_model.__doc__ = "" # clears doctest examples
586
584
 
585
+ try:
586
+ import cv2
587
+ except ImportError:
588
+ if hasattr(current_module, "video"):
589
+ current_module.video.__doc__ = "" # clears doctest examples
590
+ if hasattr(current_module, "nn_model"):
591
+ current_module.nn_model.__doc__ = "" # clears doctest examples
592
+
587
593
 
588
- import doctest, contextlib
589
- from c4dynamics import IgnoreOutputChecker, cprint
594
+ # import doctest, contextlib
595
+ # from c4dynamics import IgnoreOutputChecker, cprint
590
596
 
591
597
 
592
598
  # # Register the custom OutputChecker
@@ -1,5 +1,10 @@
1
1
  import os, sys
2
- import cv2
2
+ # optional vision modules
3
+ try:
4
+ import cv2
5
+ except ImportError:
6
+ # vision modules are unavailable
7
+ pass
3
8
 
4
9
  import numpy as np
5
10
  sys.path.append('.')
@@ -657,8 +662,21 @@ class yolov3:
657
662
 
658
663
  if __name__ == "__main__":
659
664
 
660
- from c4dynamics import rundoctests
661
- rundoctests(sys.modules[__name__])
662
-
665
+ from c4dynamics import rundoctests
666
+
667
+ # current_module = sys.modules[__name__].yolov3
668
+ current_module = sys.modules[__name__]
669
+
670
+ try:
671
+ import cv2
672
+ except ImportError:
673
+ # if hasattr(current_module, "yolov3"):
674
+ current_module.yolov3.__doc__ = "" # clears doctest examples
675
+ current_module.yolov3.detect.__doc__ = "" # clears doctest examples
676
+ current_module.yolov3.confidence_th.__doc__ = "" # clears doctest examples
677
+ current_module.yolov3.nms_th.__doc__ = "" # clears doctest examples
678
+
679
+ rundoctests(sys.modules[__name__])
680
+
663
681
 
664
682