pygeodesy 25.5.28__py2.py3-none-any.whl → 25.8.25__py2.py3-none-any.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.
pygeodesy/__init__.py CHANGED
@@ -125,7 +125,7 @@ C{epydoc --html --no-private --no-source --name=pygeodesy --url=... -v pygeodesy
125
125
  Tests
126
126
  =====
127
127
 
128
- The tests ran with Python 3.13.3 (with U{geographiclib<https://PyPI.org/project/geographiclib>} 2.0),
128
+ The tests ran with Python 3.13.5 (with U{geographiclib<https://PyPI.org/project/geographiclib>} 2.0),
129
129
  Python 3.12.7 (with U{geographiclib<https://PyPI.org/project/geographiclib>} 2.0,
130
130
  U{numpy<https://PyPI.org/project/numpy>} 2.1.0, U{scipy<https://PyPI.org/project/scipy>} 1.14.1,
131
131
  U{GeodSolve<https://GeographicLib.SourceForge.io/C++/doc/utilities.html>} 2.5,
@@ -143,20 +143,20 @@ U{GeoConvert<https://GeographicLib.SourceForge.io/C++/doc/utilities.html>} 2.5,
143
143
  U{GeodSolve<https://GeographicLib.SourceForge.io/C++/doc/utilities.html>} 2.5,
144
144
  U{IntersectTool<https://GeographicLib.SourceForge.io/C++/doc/utilities.html>} 2.5 and
145
145
  U{RhumbSolve<https://GeographicLib.SourceForge.io/C++/doc/utilities.html>} 2.5), all in 64-bit on
146
- macOS 15.5 Sequoia.
146
+ macOS 15.6.1 Sequoia.
147
147
 
148
148
  All tests ran with and without C{lazy import} for Python 3 and with command line option C{-W default} and
149
149
  env variable C{PYGEODESY_WARNINGS=on} for all Python versions. The results of those tests are included in
150
150
  the distribution files.
151
151
 
152
152
  Test coverage has been measured with U{coverage<https://PyPI.org/project/coverage>} 7.6.1 using Python
153
- 3.13.3, 3.12.7, 3.11.5 and 3.10.8. The complete coverage report in HTML and a PDF summary are included in
153
+ 3.13.5, 3.12.7, 3.11.5 and 3.10.8. The complete coverage report in HTML and a PDF summary are included in
154
154
  the distribution files.
155
155
 
156
- Python 3.13.3, 3.12.7, 3.11.5 and 3.10.8 run on Apple M4 Si (C{arm64}), I{natively}. Python 2.7.18 runs
156
+ Python 3.13.5, 3.12.7, 3.11.5 and 3.10.8 run on Apple M4 Si (C{arm64}), I{natively}. Python 2.7.18 runs
157
157
  on Intel (C{x86_64}) or Intel I{emulation} ("C{arm64_x86_64}", see function L{machine<pygeodesy.machine>}).
158
158
 
159
- The tests also ran with Python 3.13.3 (and U{geographiclib<https://PyPI.org/project/geographiclib>} 2.0) on
159
+ The tests also ran with Python 3.13.5 (and U{geographiclib<https://PyPI.org/project/geographiclib>} 2.0) on
160
160
  U{Debian 12<https://Cirrus-CI.com/github/mrJean1/PyGeodesy/master>} in 64-bit only, with Python 3.12.8 (and
161
161
  U{geographiclib<https://PyPI.org/project/geographiclib>} 2.0) on U{Windows 2019Server
162
162
  <https://CI.AppVeyor.com/project/mrJean1/pygeodesy>} in 64-bit only and with Python 2.7.18 (and U{geographiclib
@@ -166,7 +166,7 @@ in 64- and 32-bit.
166
166
  A single-File and single-Directory application with C{pygeodesy} has been bundled using U{PyInstaller
167
167
  <https://PyPI.org/project/pyinstaller>} 3.4 and 64-bit Python 3.7.3 on macOS 10.13.6 High Sierra.
168
168
 
169
- Previously, the tests were run with Python 3.13.0-2, 3.12.0-6, 3.11.2-4, 3.10.1-7, 3.9.6, 3.9.1, 3.8.7, 3.7.1, 2.7.15,
169
+ Previously, the tests were run with Python 3.13.0-4, 3.12.0-6, 3.11.2-4, 3.10.1-7, 3.9.6, 3.9.1, 3.8.7, 3.7.1, 2.7.15,
170
170
  U{PyPy<https://PyPy.org>} 7.3.12 (Python 3.10.12), 7.3.1 (Python 3.6.9) and U{PyPy<https://PyPy.org>} 7.1.1 (Python
171
171
  2.7.13) (and U{geographiclib <https://PyPI.org/project/geographiclib>} 1.52, U{numpy<https://PyPI.org/project/numpy>}
172
172
  1.16.3, 1.16.4, 1.16.6, 1.19.0, 1.19.4, 1.19.5 or 1.22.4 and U{scipy<https://PyPI.org/project/scipy>} 1.2.1, 1.4.1,
@@ -175,7 +175,7 @@ U{PyPy<https://PyPy.org>} 7.3.12 (Python 3.10.12), 7.3.1 (Python 3.6.9) and U{Py
175
175
  1.16.5, 1.16.2, 1.15.2, 1.14.0, 1.13.1, 1.8.0rc1 or 1.6.2 and U{scipy<https://PyPI.org/project/scipy>} 1.5.0), U{PyPy
176
176
  <https://PyPy.org>} 7.3.0 (Python 2.7.13 and 3.6.9), U{PyPy<https://PyPy.org>} 6.0.0 (Python 2.7.13 and 3.5.3)
177
177
  and U{Intel-Python<https://software.Intel.com/en-us/distribution-for-python>} 3.5.3 (and U{numpy
178
- <https://PyPI.org/project/numpy>} 1.11.3) on macOS 15.0-4 Sequoia, 14.0-6.1 Sonoma, 13.0-5.2 Ventura, 12.1-6 Monterey,
178
+ <https://PyPI.org/project/numpy>} 1.11.3) on macOS 15.0-5 Sequoia, 14.0-6.1 Sonoma, 13.0-5.2 Ventura, 12.1-6 Monterey,
179
179
  11.0-5.2-6.1 Big Sur (aka 10.16), 10.15.3, 10.15.5-7 Catalina, 10.14 Mojave, 10.13.6 High Sierra and 10.12 Sierra,
180
180
  MacOS X 10.11 El Capitan and/or MacOS X 10.10 Yosemite, with U{Pythonista<https://OMZ-Software.com/pythonista>}3.2
181
181
  (with geographiclib 1.50 or 1.49 and numpy 1.8.0) on iOS 14.4.2, 11.4.1, 12.0-3 on iPad4, iPhone6, iPhone10 and/or
@@ -187,10 +187,10 @@ Notes
187
187
  =====
188
188
 
189
189
  All Python source code has been statically U{checked<https://GitHub.com/ActiveState/code/tree/master/recipes/Python/
190
- 546532_PyChecker_postprocessor>} with U{Ruff<https://GitHub.com/astral-sh/ruff>} using Python 3.13.3 and with
190
+ 546532_PyChecker_postprocessor>} with U{Ruff<https://GitHub.com/astral-sh/ruff>} using Python 3.13.5 and with
191
191
  U{PyChecker<https://PyPI.org/project/pychecker>}, U{PyFlakes<https://PyPI.org/project/pyflakes>}, U{PyCodeStyle
192
192
  <https://PyPI.org/project/pycodestyle>} (formerly Pep8) and U{McCabe<https://PyPI.org/project/mccabe>} using Python
193
- 2.7.18, both in 64-bit on macOS 15.5 Sequoia only.
193
+ 2.7.18, both in 64-bit on macOS 15.6.1 Sequoia.
194
194
 
195
195
  For a summary of all I{Karney}-based functionality in C{pygeodesy}, see module U{karney
196
196
  <https://mrJean1.GitHub.io/PyGeodesy/docs/pygeodesy.karney-module.html>}.
@@ -604,7 +604,7 @@ else:
604
604
 
605
605
  from pygeodesy.internals import _version2, _DOT_ # noqa: E402
606
606
  # from pygeodesy.interns import _DOT_ # from .internals
607
- __version__ = '25.05.28'
607
+ __version__ = '25.08.25'
608
608
  # see setup.py for similar logic
609
609
  version = _DOT_(*_version2(__version__, n=3))
610
610
 
@@ -27,11 +27,11 @@ from pygeodesy.interns import _COMMASPACE_, _datum_, _no_, _phi_
27
27
  from pygeodesy.interns import _ellipsoidal_, _spherical_ # PYCHOK used!
28
28
  from pygeodesy.lazily import _ALL_DOCS, _ALL_LAZY, _ALL_MODS as _MODS
29
29
  from pygeodesy.named import _name2__, _Pass
30
- from pygeodesy.namedTuples import LatLon4Tuple, _NamedTupleTo , Vector3Tuple, \
30
+ from pygeodesy.namedTuples import LatLon4Tuple, _NamedTupleTo, Vector3Tuple, \
31
31
  Vector4Tuple
32
- # from pygeodesy.nvectorBase import _N_vector # _MODS
33
- from pygeodesy.props import deprecated_method, Property, Property_RO, property_doc_, \
34
- property_RO, _update_all
32
+ # from pygeodesy.nvectorBase import _N_Vector # _MODS
33
+ from pygeodesy.props import deprecated_method, Property, Property_RO, \
34
+ property_doc_, property_RO, _update_all
35
35
  # from pygeodesy import resections as _resections # _MODS.into
36
36
  # from pygeodesy.streprs import Fmt # from .fsums
37
37
  # from pygeodesy.triaxials import Triaxial_ # _MODS
@@ -39,12 +39,11 @@ from pygeodesy.units import Degrees, Height, _heigHt, _isMeter, Meter, Radians
39
39
  from pygeodesy.utily import acos1, atan2, sincos2d, sincos2_, degrees, radians
40
40
  from pygeodesy.vector3d import Vector3d, _xyzhdlln4
41
41
  # from pygeodesy.vector3dBase import _xyz3 # _MODS
42
- # from pygeodesy import ltp # _MODS
43
42
 
44
43
  # from math import degrees, fabs, radians, sqrt # from .fmath, .utily
45
44
 
46
45
  __all__ = _ALL_LAZY.cartesianBase
47
- __version__ = '25.05.07'
46
+ __version__ = '25.08.24'
48
47
 
49
48
  _r_ = 'r'
50
49
  _resections = _MODS.into(resections=__name__)
@@ -172,12 +171,13 @@ class CartesianBase(Vector3d, _EcefLocal):
172
171
  @raise TypeError: The B{C{datum}} is not a L{Datum}.
173
172
  '''
174
173
  d = _spherical_datum(datum, name=self.name)
175
- if self._datum: # is not None
176
- if d.isEllipsoidal and not self._datum.isEllipsoidal:
174
+ D = self._datum
175
+ if D: # is not None
176
+ if d.isEllipsoidal and not D.isEllipsoidal:
177
177
  raise _IsnotError(_ellipsoidal_, datum=datum)
178
- elif d.isSpherical and not self._datum.isSpherical:
178
+ elif d.isSpherical and not D.isSpherical:
179
179
  raise _IsnotError(_spherical_, datum=datum)
180
- if self._datum != d:
180
+ if D != d: # or (D and D.name != d.name)
181
181
  _update_all(self)
182
182
  self._datum = d
183
183
 
@@ -302,8 +302,6 @@ class CartesianBase(Vector3d, _EcefLocal):
302
302
  @note: Include keyword argument C{B{datum}=None} if class B{C{Cartesian}}
303
303
  does not accept a B{C{datum}} keyword agument.
304
304
 
305
- @raise TriaxialError: No convergence in triaxial root finding.
306
-
307
305
  @raise TypeError: Invalid or undefined B{C{earth}} or C{datum}.
308
306
  '''
309
307
  n = typename(self.height3)
@@ -410,13 +408,12 @@ class CartesianBase(Vector3d, _EcefLocal):
410
408
 
411
409
  @Property_RO
412
410
  def _N_vector(self):
413
- '''(INTERNAL) Get the (C{nvectorBase._N_vector_}).
411
+ '''(INTERNAL) Get the (C{nvectorBase._N_Vector}).
414
412
  '''
415
- _N = _MODS.nvectorBase._N_vector_
416
- x, y, z, h = self._n_xyzh4(self.datum)
417
- return _N(x, y, z, h=h, name=self.name)
413
+ _N = _MODS.nvectorBase._N_Vector
414
+ return self._n_xyzh4(self.datum, Vector=_N)
418
415
 
419
- def _n_xyzh4(self, datum):
416
+ def _n_xyzh4(self, datum, Vector=Vector4Tuple):
420
417
  '''(INTERNAL) Get the n-vector components as L{Vector4Tuple}.
421
418
  '''
422
419
  def _ErrorEPS0(x):
@@ -434,7 +431,11 @@ class CartesianBase(Vector3d, _EcefLocal):
434
431
  p = hypot2(x, y) * E.a2_
435
432
  q = z**2 * E.e21 * E.a2_
436
433
  r = fsumf_(p, q, -E.e4) / _6_0
434
+ if isnear0(r):
435
+ raise _ErrorEPS0(r)
437
436
  s = (p * q * E.e4) / (_4_0 * r**3)
437
+ if s < 0:
438
+ raise _ErrorEPS0(s)
438
439
  t = cbrt(fsumf_(_1_0, s, sqrt(s * (_2_0 + s))))
439
440
  if isnear0(t):
440
441
  raise _ErrorEPS0(t)
@@ -458,7 +459,7 @@ class CartesianBase(Vector3d, _EcefLocal):
458
459
  raise _ErrorEPS0(t)
459
460
  h = fsumf_(k, E.e2, _N_1_0) / k * t
460
461
  s = e / t # == e * tmp
461
- return Vector4Tuple(x * s, y * s, z / t, h, name=self.name)
462
+ return Vector(x * s, y * s, z / t, h, name=self.name)
462
463
 
463
464
  @Property_RO
464
465
  def philam(self):
@@ -980,8 +981,8 @@ def xyz2rtp_(x_xyz, y=0, z=0, **name):
980
981
  @kwarg name: Optional C{B{name}=NN} (C{str}).
981
982
 
982
983
  @return: L{RadiusThetaPhi3Tuple}C{(r, theta, phi)} with radial distance C{r} (C{meter},
983
- same units as C{x}, C{y} and C{z}), inclination C{theta} (with respect to the
984
- positive z-axis) and azimuthal angle C{phi}, both in L{Radians}.
984
+ same units as C{x}, C{y} and C{z}), inclination C{theta} (polar angle with
985
+ respect to the positive z-axis) and azimuthal angle C{phi}, both in L{Radians}.
985
986
 
986
987
  @see: U{Physics convention<https://WikiPedia.org/wiki/Spherical_coordinate_system>}
987
988
  (ISO 80000-2:2019), class L{RadiusThetaPhi3Tuple} and function L{xyz2rtp}.