scikit-spatial 8.0.0__tar.gz → 9.0.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 (121) hide show
  1. scikit_spatial-9.0.0/.coveragerc +9 -0
  2. scikit_spatial-9.0.0/.dockerignore +5 -0
  3. scikit_spatial-9.0.0/.github/workflows/main.yml +61 -0
  4. scikit_spatial-9.0.0/.gitignore +16 -0
  5. scikit_spatial-9.0.0/.pre-commit-config.yaml +22 -0
  6. scikit_spatial-9.0.0/.readthedocs.yml +13 -0
  7. scikit_spatial-9.0.0/CITATION.cff +11 -0
  8. scikit_spatial-9.0.0/CONTRIBUTING.rst +87 -0
  9. scikit_spatial-9.0.0/HISTORY.rst +360 -0
  10. {scikit_spatial-8.0.0/src/scikit_spatial.egg-info → scikit_spatial-9.0.0}/PKG-INFO +20 -11
  11. {scikit_spatial-8.0.0 → scikit_spatial-9.0.0}/README.md +7 -1
  12. scikit_spatial-9.0.0/docs/source/api_reference/skspatial.measurement.rst +13 -0
  13. scikit_spatial-9.0.0/docs/source/api_reference/skspatial.objects.Circle.rst +16 -0
  14. scikit_spatial-9.0.0/docs/source/api_reference/skspatial.objects.Cylinder.rst +19 -0
  15. scikit_spatial-9.0.0/docs/source/api_reference/skspatial.objects.Line.rst +25 -0
  16. scikit_spatial-9.0.0/docs/source/api_reference/skspatial.objects.LineSegment.rst +13 -0
  17. scikit_spatial-9.0.0/docs/source/api_reference/skspatial.objects.Plane.rst +27 -0
  18. scikit_spatial-9.0.0/docs/source/api_reference/skspatial.objects.Point.rst +12 -0
  19. scikit_spatial-9.0.0/docs/source/api_reference/skspatial.objects.Points.rst +19 -0
  20. scikit_spatial-9.0.0/docs/source/api_reference/skspatial.objects.Sphere.rst +16 -0
  21. scikit_spatial-9.0.0/docs/source/api_reference/skspatial.objects.Triangle.rst +24 -0
  22. scikit_spatial-9.0.0/docs/source/api_reference/skspatial.objects.Vector.rst +26 -0
  23. scikit_spatial-9.0.0/docs/source/api_reference/skspatial.objects.rst +16 -0
  24. scikit_spatial-9.0.0/docs/source/api_reference/skspatial.transformation.rst +11 -0
  25. scikit_spatial-9.0.0/docs/source/api_reference/toc.rst +20 -0
  26. scikit_spatial-9.0.0/docs/source/conf.py +190 -0
  27. scikit_spatial-9.0.0/docs/source/images/logo.svg +604 -0
  28. scikit_spatial-9.0.0/docs/source/index.rst +63 -0
  29. scikit_spatial-9.0.0/docs/source/objects/circle.rst +29 -0
  30. scikit_spatial-9.0.0/docs/source/objects/cylinder.rst +31 -0
  31. scikit_spatial-9.0.0/docs/source/objects/line.rst +41 -0
  32. scikit_spatial-9.0.0/docs/source/objects/line_segment.rst +35 -0
  33. scikit_spatial-9.0.0/docs/source/objects/plane.rst +35 -0
  34. scikit_spatial-9.0.0/docs/source/objects/point_vector.rst +62 -0
  35. scikit_spatial-9.0.0/docs/source/objects/points.rst +47 -0
  36. scikit_spatial-9.0.0/docs/source/objects/sphere.rst +29 -0
  37. scikit_spatial-9.0.0/docs/source/objects/toc.rst +16 -0
  38. scikit_spatial-9.0.0/docs/source/objects/triangle.rst +57 -0
  39. scikit_spatial-9.0.0/docs/source/plotting.rst +67 -0
  40. scikit_spatial-9.0.0/docs/source/requirements.txt +6 -0
  41. scikit_spatial-9.0.0/examples/README.txt +3 -0
  42. scikit_spatial-9.0.0/examples/fitting/README.txt +3 -0
  43. scikit_spatial-9.0.0/examples/fitting/plot_line_2d.py +31 -0
  44. scikit_spatial-9.0.0/examples/fitting/plot_line_3d.py +31 -0
  45. scikit_spatial-9.0.0/examples/fitting/plot_plane.py +20 -0
  46. scikit_spatial-9.0.0/examples/intersection/README.txt +3 -0
  47. scikit_spatial-9.0.0/examples/intersection/plot_circle_circle.py +24 -0
  48. scikit_spatial-9.0.0/examples/intersection/plot_cylinder_line.py +21 -0
  49. scikit_spatial-9.0.0/examples/intersection/plot_line_circle.py +23 -0
  50. scikit_spatial-9.0.0/examples/intersection/plot_line_line_2d.py +20 -0
  51. scikit_spatial-9.0.0/examples/intersection/plot_line_line_3d.py +20 -0
  52. scikit_spatial-9.0.0/examples/intersection/plot_line_plane.py +20 -0
  53. scikit_spatial-9.0.0/examples/intersection/plot_plane_plane.py +20 -0
  54. scikit_spatial-9.0.0/examples/intersection/plot_sphere_line.py +21 -0
  55. scikit_spatial-9.0.0/examples/projection/README.txt +3 -0
  56. scikit_spatial-9.0.0/examples/projection/plot_line_plane.py +22 -0
  57. scikit_spatial-9.0.0/examples/projection/plot_point_line.py +25 -0
  58. scikit_spatial-9.0.0/examples/projection/plot_point_plane.py +24 -0
  59. scikit_spatial-9.0.0/examples/projection/plot_vector_line.py +22 -0
  60. scikit_spatial-9.0.0/examples/projection/plot_vector_plane.py +24 -0
  61. scikit_spatial-9.0.0/examples/projection/plot_vector_vector.py +24 -0
  62. scikit_spatial-9.0.0/examples/triangle/README.txt +3 -0
  63. scikit_spatial-9.0.0/examples/triangle/plot_normal.py +21 -0
  64. scikit_spatial-9.0.0/examples/triangle/plot_orthocenter.py +19 -0
  65. scikit_spatial-9.0.0/images/logo.svg +604 -0
  66. scikit_spatial-9.0.0/mypy.ini +7 -0
  67. {scikit_spatial-8.0.0 → scikit_spatial-9.0.0}/pyproject.toml +14 -8
  68. {scikit_spatial-8.0.0 → scikit_spatial-9.0.0}/src/skspatial/objects/_base_sphere.py +3 -1
  69. {scikit_spatial-8.0.0 → scikit_spatial-9.0.0}/src/skspatial/objects/circle.py +3 -3
  70. {scikit_spatial-8.0.0 → scikit_spatial-9.0.0}/src/skspatial/objects/cylinder.py +4 -3
  71. {scikit_spatial-8.0.0 → scikit_spatial-9.0.0}/src/skspatial/objects/line.py +39 -12
  72. {scikit_spatial-8.0.0 → scikit_spatial-9.0.0}/src/skspatial/objects/line_segment.py +6 -5
  73. {scikit_spatial-8.0.0 → scikit_spatial-9.0.0}/src/skspatial/objects/plane.py +33 -12
  74. {scikit_spatial-8.0.0 → scikit_spatial-9.0.0}/src/skspatial/objects/point.py +6 -5
  75. {scikit_spatial-8.0.0 → scikit_spatial-9.0.0}/src/skspatial/objects/points.py +6 -5
  76. {scikit_spatial-8.0.0 → scikit_spatial-9.0.0}/src/skspatial/objects/sphere.py +1 -2
  77. {scikit_spatial-8.0.0 → scikit_spatial-9.0.0}/src/skspatial/objects/triangle.py +2 -4
  78. {scikit_spatial-8.0.0 → scikit_spatial-9.0.0}/src/skspatial/objects/vector.py +4 -5
  79. {scikit_spatial-8.0.0 → scikit_spatial-9.0.0}/src/skspatial/plotting.py +12 -3
  80. scikit_spatial-9.0.0/tests/__init__.py +0 -0
  81. scikit_spatial-9.0.0/tests/unit/__init__.py +0 -0
  82. scikit_spatial-9.0.0/tests/unit/objects/__init__.py +0 -0
  83. scikit_spatial-9.0.0/tests/unit/objects/test_all_objects.py +45 -0
  84. scikit_spatial-9.0.0/tests/unit/objects/test_base_array.py +49 -0
  85. scikit_spatial-9.0.0/tests/unit/objects/test_base_array_1d.py +72 -0
  86. scikit_spatial-9.0.0/tests/unit/objects/test_base_array_2d.py +20 -0
  87. scikit_spatial-9.0.0/tests/unit/objects/test_base_line_plane.py +12 -0
  88. scikit_spatial-9.0.0/tests/unit/objects/test_circle.py +254 -0
  89. scikit_spatial-9.0.0/tests/unit/objects/test_cylinder.py +337 -0
  90. scikit_spatial-9.0.0/tests/unit/objects/test_line.py +391 -0
  91. scikit_spatial-9.0.0/tests/unit/objects/test_line_plane.py +52 -0
  92. scikit_spatial-9.0.0/tests/unit/objects/test_line_segment.py +95 -0
  93. scikit_spatial-9.0.0/tests/unit/objects/test_plane.py +507 -0
  94. scikit_spatial-9.0.0/tests/unit/objects/test_point.py +26 -0
  95. scikit_spatial-9.0.0/tests/unit/objects/test_points.py +125 -0
  96. scikit_spatial-9.0.0/tests/unit/objects/test_sphere.py +201 -0
  97. scikit_spatial-9.0.0/tests/unit/objects/test_triangle.py +186 -0
  98. scikit_spatial-9.0.0/tests/unit/objects/test_vector.py +336 -0
  99. scikit_spatial-9.0.0/tests/unit/test_functions.py +39 -0
  100. scikit_spatial-9.0.0/tests/unit/test_measurement.py +78 -0
  101. scikit_spatial-9.0.0/tox.ini +52 -0
  102. scikit_spatial-9.0.0/uv.lock +910 -0
  103. scikit_spatial-8.0.0/PKG-INFO +0 -276
  104. scikit_spatial-8.0.0/setup.cfg +0 -4
  105. scikit_spatial-8.0.0/src/scikit_spatial.egg-info/SOURCES.txt +0 -32
  106. scikit_spatial-8.0.0/src/scikit_spatial.egg-info/dependency_links.txt +0 -1
  107. scikit_spatial-8.0.0/src/scikit_spatial.egg-info/requires.txt +0 -3
  108. scikit_spatial-8.0.0/src/scikit_spatial.egg-info/top_level.txt +0 -1
  109. {scikit_spatial-8.0.0 → scikit_spatial-9.0.0}/AUTHORS.rst +0 -0
  110. {scikit_spatial-8.0.0 → scikit_spatial-9.0.0}/LICENSE +0 -0
  111. {scikit_spatial-8.0.0 → scikit_spatial-9.0.0}/src/skspatial/__init__.py +0 -0
  112. {scikit_spatial-8.0.0 → scikit_spatial-9.0.0}/src/skspatial/_functions.py +0 -0
  113. {scikit_spatial-8.0.0 → scikit_spatial-9.0.0}/src/skspatial/measurement.py +0 -0
  114. {scikit_spatial-8.0.0 → scikit_spatial-9.0.0}/src/skspatial/objects/__init__.py +0 -0
  115. {scikit_spatial-8.0.0 → scikit_spatial-9.0.0}/src/skspatial/objects/_base_array.py +0 -0
  116. {scikit_spatial-8.0.0 → scikit_spatial-9.0.0}/src/skspatial/objects/_base_line_plane.py +0 -0
  117. {scikit_spatial-8.0.0 → scikit_spatial-9.0.0}/src/skspatial/objects/_base_spatial.py +0 -0
  118. {scikit_spatial-8.0.0 → scikit_spatial-9.0.0}/src/skspatial/objects/_mixins.py +0 -0
  119. {scikit_spatial-8.0.0 → scikit_spatial-9.0.0}/src/skspatial/py.typed +0 -0
  120. {scikit_spatial-8.0.0 → scikit_spatial-9.0.0}/src/skspatial/transformation.py +0 -0
  121. {scikit_spatial-8.0.0 → scikit_spatial-9.0.0}/src/skspatial/typing.py +0 -0
@@ -0,0 +1,9 @@
1
+ [run]
2
+ source =
3
+ src/
4
+ omit =
5
+ */plotting.py
6
+
7
+ [report]
8
+ exclude_lines =
9
+ def *plot*
@@ -0,0 +1,5 @@
1
+ **/*.ipynb
2
+ **/*.md5
3
+ **/*.pickle
4
+ **/*.pyc
5
+ docs/source/gallery
@@ -0,0 +1,61 @@
1
+ name: scikit-spatial
2
+
3
+ on:
4
+ pull_request:
5
+ push:
6
+ tags:
7
+ - "v*.*.*"
8
+
9
+ jobs:
10
+ build:
11
+ runs-on: ubuntu-latest
12
+ strategy:
13
+ fail-fast: false
14
+ matrix:
15
+ python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
16
+
17
+ steps:
18
+ - uses: actions/checkout@v2
19
+
20
+ - name: Install uv
21
+ uses: astral-sh/setup-uv@v3
22
+ with:
23
+ version: "0.4.18"
24
+
25
+ - name: Set up Python ${{ matrix.python-version }}
26
+ uses: actions/setup-python@v5
27
+ with:
28
+ python-version: ${{ matrix.python-version }}
29
+
30
+ - name: Install tox
31
+ run: uv tool install tox --with tox-uv --with tox-gh
32
+
33
+ - name: Run tox
34
+ run: tox
35
+
36
+ - name: Upload coverage report to codecov
37
+ if: matrix.python-version == '3.12'
38
+ uses: codecov/codecov-action@v4
39
+ with:
40
+ fail_ci_if_error: true
41
+ verbose: true
42
+ token: ${{ secrets.CODECOV_TOKEN }}
43
+
44
+ publish:
45
+ needs: build
46
+ if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
47
+
48
+ runs-on: ubuntu-latest
49
+
50
+ steps:
51
+ - uses: actions/checkout@v2
52
+
53
+ - name: Install uv
54
+ uses: astral-sh/setup-uv@v3
55
+ with:
56
+ version: "0.4.18"
57
+
58
+ - name: Build and publish to PyPI
59
+ run: |
60
+ uv build
61
+ uv publish --token ${{ secrets.PYPI_API_TOKEN }}
@@ -0,0 +1,16 @@
1
+ *.egg-info
2
+ *.ipynb
3
+ *.pyc
4
+ *.xml
5
+ .*/
6
+ .coverage
7
+ .python-version
8
+ build/
9
+ dist/
10
+ docs/build/
11
+ docs/source/api_reference/*/
12
+ docs/source/computations/*/
13
+ docs/source/gallery/
14
+ htmlcov/
15
+
16
+ !.github/
@@ -0,0 +1,22 @@
1
+ repos:
2
+ - repo: https://github.com/pre-commit/pre-commit-hooks
3
+ rev: v4.4.0
4
+ hooks:
5
+ - id: check-ast
6
+ - id: check-builtin-literals
7
+ - id: check-docstring-first
8
+ - id: check-merge-conflict
9
+ - id: check-yaml
10
+ - id: end-of-file-fixer
11
+ - id: trailing-whitespace
12
+ - repo: https://github.com/pre-commit/mirrors-prettier
13
+ rev: v3.0.0-alpha.4
14
+ hooks:
15
+ - id: prettier
16
+ - repo: https://github.com/astral-sh/ruff-pre-commit
17
+ rev: v0.2.1
18
+ hooks:
19
+ - id: ruff
20
+ args: [--fix, --preview]
21
+ - id: ruff-format
22
+ args: [--preview]
@@ -0,0 +1,13 @@
1
+ version: 2
2
+
3
+ build:
4
+ os: ubuntu-22.04
5
+ tools:
6
+ python: "3.8"
7
+
8
+ sphinx:
9
+ configuration: docs/source/conf.py
10
+
11
+ python:
12
+ install:
13
+ - requirements: docs/source/requirements.txt
@@ -0,0 +1,11 @@
1
+ cff-version: 1.2.0
2
+ title: "scikit-spatial: Spatial objects and computations based on NumPy arrays"
3
+ message: "If you use this software, please cite it using the metadata from this file."
4
+ type: software
5
+ authors:
6
+ - given-names: Andrew
7
+ family-names: Hynes
8
+ email: andrewjhynes@gmail.com
9
+ license: BSD-3-Clause
10
+ url: https://scikit-spatial.readthedocs.io
11
+ repository-code: https://github.com/ajhynes7/scikit-spatial
@@ -0,0 +1,87 @@
1
+ ============
2
+ Contributing
3
+ ============
4
+
5
+ You can contribute in many ways:
6
+
7
+ Types of Contributions
8
+ ----------------------
9
+
10
+ Report Bugs
11
+ ~~~~~~~~~~~
12
+
13
+ Report bugs at https://github.com/ajhynes7/scikit-spatial/issues.
14
+
15
+ If you are reporting a bug, please include:
16
+
17
+ * Your operating system name and version.
18
+ * Any details about your local setup that might be helpful in troubleshooting.
19
+ * Detailed steps to reproduce the bug.
20
+
21
+ Fix Bugs
22
+ ~~~~~~~~
23
+
24
+ Look through the GitHub issues for bugs. Anything tagged with "bug" and "help
25
+ wanted" is open to whoever wants to implement it.
26
+
27
+ Implement Features
28
+ ~~~~~~~~~~~~~~~~~~
29
+
30
+ Look through the GitHub issues for features. Anything tagged with "enhancement"
31
+ and "help wanted" is open to whoever wants to implement it.
32
+
33
+ Submit Feedback
34
+ ~~~~~~~~~~~~~~~
35
+
36
+ The best way to send feedback is to file an issue at https://github.com/ajhynes7/scikit-spatial/issues.
37
+
38
+
39
+ Get Started!
40
+ ------------
41
+
42
+ Ready to contribute? Here's how to set up `scikit-spatial` for local development.
43
+
44
+ 1. Fork the `scikit-spatial` repo on GitHub.
45
+
46
+ 2. Create a branch for local development::
47
+
48
+ $ git checkout -b name-of-your-bugfix-or-feature
49
+
50
+ Now you can make your changes locally.
51
+
52
+ 3. When you're done making changes, check that your changes pass linting and tests.
53
+ See ``.travis.yml`` for test commands.
54
+
55
+ 4. Commit your changes and push your branch to GitHub::
56
+
57
+ $ git add .
58
+ $ git commit -m "Your detailed description of your changes."
59
+ $ git push origin name-of-your-bugfix-or-feature
60
+
61
+ 5. Submit a pull request through the GitHub website.
62
+
63
+
64
+ Pull Request Guidelines
65
+ -----------------------
66
+
67
+ Before you submit a pull request, check that it meets these guidelines:
68
+
69
+ 1. The pull request should include tests.
70
+ 2. If the pull request adds functionality, the docs should be updated. Put
71
+ your new functionality into a function with a docstring.
72
+ 3. Check https://travis-ci.org/ajhynes7/scikit-spatial/pull_requests
73
+ and make sure that the tests pass for all supported Python versions.
74
+
75
+
76
+ Deploying
77
+ ---------
78
+
79
+ A reminder for the maintainers on how to deploy.
80
+ Make sure all your changes are committed (including an entry in HISTORY.rst).
81
+ Then run::
82
+
83
+ $ bumpversion patch # possible: major / minor / patch
84
+ $ git push
85
+ $ git push --tags
86
+
87
+ Travis will then deploy to PyPI if tests pass.
@@ -0,0 +1,360 @@
1
+ =======
2
+ History
3
+ =======
4
+
5
+ 9.0.0 (2024-12-23)
6
+ ------------------
7
+
8
+ Breaking Changes
9
+ ~~~~~~~~~~~~~~~~
10
+ - Make matplotlib an optional dependency. It can be installed by `pip install scikit-spatial[plotting]`
11
+
12
+
13
+ 8.1.0 (2024-12-23)
14
+ ------------------
15
+
16
+ Features
17
+ ~~~~~~~~
18
+ - Add option to return error for line and plane of best fit.
19
+
20
+
21
+ 8.0.0 (2024-10-03)
22
+ ------------------
23
+
24
+ Features
25
+ ~~~~~~~~
26
+ - Support NumPy 2.0.
27
+
28
+
29
+ 7.2.2 (2024-03-27)
30
+ ------------------
31
+
32
+ Fixes
33
+ ~~~~~
34
+ - Change reference in `Plane.best_fit` docstring as the previous link was broken.
35
+ - Change `README.rst` to `README.md` as GitHub was not rendering the former well.
36
+
37
+
38
+ 7.2.1 (2024-02-17)
39
+ ------------------
40
+
41
+ Docs
42
+ ~~~~
43
+ Include new methods in the documentation:
44
+ - `Line.project_points`
45
+ - `Line.distance_points`
46
+ - `Plane.project_points`
47
+ - `Plane.distance_points`
48
+
49
+
50
+ 7.2.0 (2024-02-12)
51
+ ------------------
52
+
53
+ Features
54
+ ~~~~~~~~
55
+ - Add new methods:
56
+ - `Line.project_points`
57
+ - `Line.distance_points`
58
+ - `Plane.project_points`
59
+ - `Plane.distance_points`
60
+
61
+
62
+ 7.1.1 (2024-01-29)
63
+ ------------------
64
+
65
+ Fixes
66
+ ~~~~~
67
+ - Restore import of `importlib_metadata`.
68
+
69
+
70
+ 7.1.0 (2024-01-28)
71
+ ------------------
72
+
73
+ Features
74
+ ~~~~~~~~
75
+ - Add support for Python 3.12.
76
+
77
+
78
+ 7.0.0 (2023-03-26)
79
+ ------------------
80
+
81
+ Breaking Changes
82
+ ~~~~~~~~~~~~~~~~
83
+ - Drop support for Python 3.7.
84
+ - Increase minimum NumPy version to 1.17.3 (to be compatible with the new dependency SciPy).
85
+
86
+ Features
87
+ ~~~~~~~~
88
+ - Add `Cylinder.best_fit` method.
89
+
90
+
91
+ 6.8.1 (2023-03-07)
92
+ ------------------
93
+
94
+ Fixes
95
+ ~~~~~
96
+ - Add missing `plotter` method to `LineSegment`.
97
+
98
+
99
+ 6.8.0 (2023-01-28)
100
+ ------------------
101
+
102
+ Features
103
+ ~~~~~~~~
104
+ - Add `Circle.from_points` method.
105
+ - Add `check_coplanar` kwarg to `Line.intersect_line`.
106
+ - Lower minimum NumPy version to 1.16.
107
+
108
+
109
+ 6.7.0 (2022-12-28)
110
+ ------------------
111
+
112
+ Features
113
+ ~~~~~~~~
114
+ - Add `Circle.intersect_circle` method.
115
+
116
+
117
+ 6.6.0 (2022-11-20)
118
+ ------------------
119
+
120
+ Features
121
+ ~~~~~~~~
122
+ - Add `Vector.angle_signed_3d` method.
123
+
124
+
125
+ 6.5.0 (2022-09-05)
126
+ ------------------
127
+
128
+ Features
129
+ ~~~~~~~~
130
+ - Add `LineSegment` class.
131
+
132
+ Docs
133
+ ~~~~
134
+ - Add plot of Cylinder-Line Intersection to the gallery.
135
+
136
+
137
+ 6.4.1 (2022-06-21)
138
+ ------------------
139
+
140
+ Fixes
141
+ ~~~~~
142
+ - Update the `dimension` value of a slice, instead of using the value of the original array.
143
+ - Fix the output radius of `Cylinder.to_mesh`.
144
+
145
+
146
+ 6.4.0 (2022-04-07)
147
+ ------------------
148
+
149
+ Features
150
+ ~~~~~~~~
151
+ - Add `Plane.project_line` method to project a line onto a plane.
152
+
153
+
154
+ 6.3.0 (2022-02-26)
155
+ ------------------
156
+
157
+ Features
158
+ ~~~~~~~~
159
+ - Add `Circle.best_fit` method to fit a circle to 2D points.
160
+ - Add `area_signed` function to compute the signed area of a polygon using the shoelace algorithm.
161
+
162
+
163
+ 6.2.1 (2022-01-08)
164
+ ------------------
165
+
166
+ Fixes
167
+ ~~~~~
168
+ - Allow for versions of `importlib-metadata` above 1.
169
+
170
+
171
+ 6.2.0 (2021-10-06)
172
+ ------------------
173
+
174
+ Features
175
+ ~~~~~~~~
176
+ - Add `infinite` keyword argument to `Cylinder.intersect_line` with a default value of `True`.
177
+ Now the line can be intersected with a finite cylinder by passing `infinite=False`.
178
+
179
+ Fixes
180
+ ~~~~~
181
+ - Fix the return type hint of `Plane.intersect_line` (from Plane to Point).
182
+
183
+
184
+ 6.1.1 (2021-09-11)
185
+ ------------------
186
+
187
+ Fixes
188
+ ~~~~~
189
+ - Add code to `skspatial.__init__.py` to keep the __version__ attribute in sync with the version in `pyproject.toml`.
190
+
191
+
192
+ 6.1.0 (2021-07-25)
193
+ ------------------
194
+
195
+ Features
196
+ ~~~~~~~~
197
+ - Add `lateral_surface_area` and `surface_area` methods to `Cylinder`.
198
+
199
+ Improvements
200
+ ~~~~~~~~~~~~
201
+ - Remove unnecessary `np.copy` from `Circle.intersect_line`.
202
+ - Complete the docstring for `Line.distance_point`.
203
+
204
+
205
+ 6.0.1 (2021-03-25)
206
+ ------------------
207
+
208
+ Fixes
209
+ ~~~~~
210
+ * Wrap `filterwarnings("error")` in a `catch_warnings` context manager, in `__BaseArray.__new__()`.
211
+ Now the warning level is reset at the end of the context manager.
212
+
213
+
214
+ 6.0.0 (2021-03-21)
215
+ ------------------
216
+
217
+ Breaking changes
218
+ ~~~~~~~~~~~~~~~~
219
+ * Require NumPy >= 1.20 to make use of the static types introduced in 1.20.
220
+ Now numpy-stubs doesn't need to be installed for static type checking.
221
+ * Move tests outside of package, and move package under ``src`` directory.
222
+ This ensures that tox is running the tests with the installed package.
223
+ * Switch from ``setup.py`` to ``pyproject.toml``.
224
+ * Add more ValueErrors for clarity, such as "The lines must have the same dimension"
225
+ ValueError in ``Line.intersect_line``.
226
+
227
+ Features
228
+ ~~~~~~~~
229
+ * Add ``Cylinder`` class.
230
+ * Add ``Vector.different_direction`` method.
231
+ * Add ``Sphere.best_fit`` method.
232
+
233
+ Refactoring
234
+ ~~~~~~~~~~~
235
+ * Delete ``Vector.dot`` method. The ``dot`` method is already inherited from NumPy.
236
+
237
+
238
+ 5.2.0 (2020-12-19)
239
+ ------------------
240
+ * Add keyword arguments to ``Plane.best_fit`` and ``Line.best_fit``.
241
+ These are passed to ``np.linalg.svd``.
242
+
243
+
244
+ 5.1.0 (2020-12-07)
245
+ ------------------
246
+ * Edit type annotations to support Python 3.6.
247
+ * CI now tests Python versions 3.6-3.9.
248
+
249
+
250
+ 5.0.0 (2020-11-23)
251
+ ------------------
252
+ * Return regular ``ndarray`` from inherited NumPy functions, e.g. ``vector.sum()``
253
+ - This prevents getting spatial objects with disallowed dimensions, such as a 0-D vector.
254
+ - This fixes broken examples in the README.
255
+ * Test README examples with doctest.
256
+ * Replace tox with Docker.
257
+ - Docker multi-stage builds are a convenient feature for isolating test environments.
258
+ * Organize requirements into multiple files.
259
+ - This makes it easy to install only what's needed for each test environment.
260
+
261
+
262
+ 4.0.1 (2020-02-01)
263
+ ------------------
264
+ * Fix to replace Python 3.6 with 3.8 in the setup.py file.
265
+
266
+
267
+ 4.0.0 (2020-02-01)
268
+ ------------------
269
+ * Drop support for Python 3.6 (this allows for postponed evaluation of type annotations, introduced in Python 3.7).
270
+ * Add Triangle class.
271
+
272
+
273
+ 3.0.0 (2019-11-02)
274
+ ------------------
275
+ * Add `Points.normalize_distance` method to fit points inside a unit sphere.
276
+ * Change `Points.mean_center` to only return the centroid of the points if specified.
277
+ This allows for chaining with other transformations on points, like `normalize_distance`.
278
+ * Add `to_array` method to convert an array based object to a regular NumPy array.
279
+
280
+
281
+ 2.0.1 (2019-08-15)
282
+ ------------------
283
+ * Use installation of numpy-stubs from its GitHub repository instead of a custom numpy stubs folder.
284
+ * Introduce 'array_like' type annotation as the union of np.ndarray and Sequence.
285
+ * Add py.typed file so that annotations can be used when scikit-spatial is installed.
286
+
287
+
288
+ 2.0.0 (2019-07-20)
289
+ ------------------
290
+ * Replace some NumPy functions with ones from Python math module. The math functions are faster than NumPy when the inputs are scalars.
291
+ The tolerances for isclose are now rel_tol and abs_tol instead of rtol and atol.
292
+ The math.isclose function is preferable to np.isclose for three main reasons:
293
+ * It is symmetric (isclose(a, b) == isclose(b, a)).
294
+ * It has a default absolute tolerance of zero.
295
+ * It does not correlate the absolute and relative tolerances.
296
+ * Add type annotations to methods and run mypy in Travis CI.
297
+ * Add round method to array objects (Point, Points and Vector). Now a Vector is returned when a Vector is rounded.
298
+ * Add methods to return coordinates on the surface of a Plane or Sphere. The coordinates are used for 3D plotting.
299
+ * Improve Plane plotting so that vertical planes can be plotted.
300
+
301
+
302
+ 1.5.0 (2019-07-04)
303
+ ------------------
304
+ * Add Circle and Sphere spatial objects.
305
+ * Add scalar keyword argument to Vector plot methods.
306
+ * Improve plotting of Plane. The x and y limits now treat the plane point as the origin.
307
+
308
+
309
+ 1.4.2 (2019-06-21)
310
+ ------------------
311
+ * Extra release because regex for version tags was incorrect in Travis.
312
+
313
+
314
+ 1.4.1 (2019-06-21)
315
+ ------------------
316
+ * Extra release because Travis did not deploy the last one.
317
+
318
+
319
+ 1.4.0 (2019-06-21)
320
+ ------------------
321
+ * Add functions `plot_2d` and `plot_3d` to facilitate plotting multiple spatial objects.
322
+ * Change `_plotting` module name to `plotting`, because it now contains some public functions.
323
+
324
+
325
+ 1.3.0 (2019-06-19)
326
+ ------------------
327
+ * Remove dpcontracts as a dependency. The contracts were causing performance issues.
328
+ * Add 'dimension' attribute to all spatial objects.
329
+ * Add Vector.angle_signed method.
330
+ * Add Line.from_slope method.
331
+
332
+
333
+ 1.2.0 (2019-06-11)
334
+ ------------------
335
+ * Move tests into skspatial directory. This allows for importing custom hypothesis strategies for testing other projects.
336
+ * Drop support for Python 3.5 (matplotlib requires >= 3.6).
337
+
338
+
339
+ 1.1.0 (2019-05-04)
340
+ ------------------
341
+ * Add methods for 2D and 3D plotting.
342
+ * Rename private modules and functions to include leading underscore.
343
+
344
+
345
+ 1.0.1 (2019-03-29)
346
+ ------------------
347
+ * Support Python versions 3.5-3.7.
348
+
349
+
350
+ 1.0.0 (2019-03-26)
351
+ ------------------
352
+ * Change Vector and Point to be subclasses of the NumPy `ndarray`.
353
+ * Change all spatial objects to accept `array_like` inputs, such as a list or tuple.
354
+ * Add the Points class to represent multiple points in space. This is also an `ndarray` subclass.
355
+ * The dimension of the objects is no longer automatically set to 3D. Points and vectors can be 2D and up.
356
+
357
+
358
+ 0.1.0 (2019-02-27)
359
+ ------------------
360
+ * First release on PyPI.
@@ -1,12 +1,14 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: scikit-spatial
3
- Version: 8.0.0
3
+ Version: 9.0.0
4
4
  Summary: Spatial objects and computations based on NumPy arrays.
5
- Author-email: Andrew Hynes <andrewjhynes@gmail.com>
6
- License: BSD-3-Clause
7
5
  Project-URL: repository, https://github.com/ajhynes7/scikit-spatial
8
6
  Project-URL: documentation, https://scikit-spatial.readthedocs.io
9
- Keywords: NumPy,matplotlib,visualization,spatial,linear algebra
7
+ Author-email: Andrew Hynes <andrewjhynes@gmail.com>
8
+ License: BSD-3-Clause
9
+ License-File: AUTHORS.rst
10
+ License-File: LICENSE
11
+ Keywords: NumPy,linear algebra,matplotlib,spatial,visualization
10
12
  Classifier: Development Status :: 5 - Production/Stable
11
13
  Classifier: Intended Audience :: Science/Research
12
14
  Classifier: License :: OSI Approved :: BSD License
@@ -18,12 +20,13 @@ Classifier: Programming Language :: Python :: 3.11
18
20
  Classifier: Programming Language :: Python :: 3.12
19
21
  Classifier: Topic :: Scientific/Engineering
20
22
  Requires-Python: >=3.8
23
+ Requires-Dist: numpy>1.24; python_version >= '3.12'
24
+ Requires-Dist: numpy>=1; python_version < '3.12'
25
+ Requires-Dist: scipy>1.11; python_version >= '3.12'
26
+ Requires-Dist: scipy>=1; python_version < '3.12'
27
+ Provides-Extra: plotting
28
+ Requires-Dist: matplotlib>=3; extra == 'plotting'
21
29
  Description-Content-Type: text/markdown
22
- License-File: LICENSE
23
- License-File: AUTHORS.rst
24
- Requires-Dist: matplotlib>=3
25
- Requires-Dist: numpy>=1.24
26
- Requires-Dist: scipy>=1.9
27
30
 
28
31
  ![](images/logo.svg)
29
32
 
@@ -31,7 +34,6 @@ Requires-Dist: scipy>=1.9
31
34
  [![image](https://anaconda.org/conda-forge/scikit-spatial/badges/version.svg)](https://anaconda.org/conda-forge/scikit-spatial)
32
35
  [![image](https://img.shields.io/pypi/pyversions/scikit-spatial.svg)](https://pypi.python.org/pypi/scikit-spatial)
33
36
  [![image](https://github.com/ajhynes7/scikit-spatial/actions/workflows/main.yml/badge.svg)](https://github.com/ajhynes7/scikit-spatial/actions/workflows/main.yml)
34
- [![pre-commit.ci status](https://results.pre-commit.ci/badge/github/ajhynes7/scikit-spatial/master.svg)](https://results.pre-commit.ci/latest/github/ajhynes7/scikit-spatial/master)
35
37
  [![Documentation Status](https://readthedocs.org/projects/scikit-spatial/badge/?version=latest)](https://scikit-spatial.readthedocs.io/en/latest/?badge=latest)
36
38
  [![image](https://codecov.io/gh/ajhynes7/scikit-spatial/branch/master/graph/badge.svg)](https://codecov.io/gh/ajhynes7/scikit-spatial)
37
39
 
@@ -178,6 +180,13 @@ $ conda install scikit-spatial -c conda-forge
178
180
 
179
181
  ```
180
182
 
183
+ The `matplotlib` dependency is optional. To enable plotting, you can install scikit-spatial with the extra `plotting`.
184
+
185
+ ```bash
186
+ $ pip install scikit-spatial[plotting]
187
+
188
+ ```
189
+
181
190
  # Example Usage
182
191
 
183
192
  ## Measurement
@@ -4,7 +4,6 @@
4
4
  [![image](https://anaconda.org/conda-forge/scikit-spatial/badges/version.svg)](https://anaconda.org/conda-forge/scikit-spatial)
5
5
  [![image](https://img.shields.io/pypi/pyversions/scikit-spatial.svg)](https://pypi.python.org/pypi/scikit-spatial)
6
6
  [![image](https://github.com/ajhynes7/scikit-spatial/actions/workflows/main.yml/badge.svg)](https://github.com/ajhynes7/scikit-spatial/actions/workflows/main.yml)
7
- [![pre-commit.ci status](https://results.pre-commit.ci/badge/github/ajhynes7/scikit-spatial/master.svg)](https://results.pre-commit.ci/latest/github/ajhynes7/scikit-spatial/master)
8
7
  [![Documentation Status](https://readthedocs.org/projects/scikit-spatial/badge/?version=latest)](https://scikit-spatial.readthedocs.io/en/latest/?badge=latest)
9
8
  [![image](https://codecov.io/gh/ajhynes7/scikit-spatial/branch/master/graph/badge.svg)](https://codecov.io/gh/ajhynes7/scikit-spatial)
10
9
 
@@ -151,6 +150,13 @@ $ conda install scikit-spatial -c conda-forge
151
150
 
152
151
  ```
153
152
 
153
+ The `matplotlib` dependency is optional. To enable plotting, you can install scikit-spatial with the extra `plotting`.
154
+
155
+ ```bash
156
+ $ pip install scikit-spatial[plotting]
157
+
158
+ ```
159
+
154
160
  # Example Usage
155
161
 
156
162
  ## Measurement
@@ -0,0 +1,13 @@
1
+
2
+ skspatial.measurement
3
+ =====================
4
+
5
+ .. automodule:: skspatial.measurement
6
+
7
+
8
+ .. autosummary::
9
+ :toctree: measurement/functions
10
+
11
+ area_signed
12
+ area_triangle
13
+ volume_tetrahedron