pygeodesy 24.10.24__py2.py3-none-any.whl → 24.12.12__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.
Files changed (118) hide show
  1. {PyGeodesy-24.10.24.dist-info → PyGeodesy-24.12.12.dist-info}/METADATA +6 -6
  2. PyGeodesy-24.12.12.dist-info/RECORD +118 -0
  3. {PyGeodesy-24.10.24.dist-info → PyGeodesy-24.12.12.dist-info}/WHEEL +1 -1
  4. pygeodesy/__init__.py +5 -5
  5. pygeodesy/__main__.py +1 -1
  6. pygeodesy/albers.py +5 -5
  7. pygeodesy/auxilats/_CX_4.py +1 -1
  8. pygeodesy/auxilats/_CX_6.py +1 -1
  9. pygeodesy/auxilats/_CX_8.py +1 -1
  10. pygeodesy/auxilats/_CX_Rs.py +1 -1
  11. pygeodesy/auxilats/__init__.py +1 -1
  12. pygeodesy/auxilats/__main__.py +1 -1
  13. pygeodesy/auxilats/auxAngle.py +5 -5
  14. pygeodesy/auxilats/auxDLat.py +6 -6
  15. pygeodesy/auxilats/auxDST.py +2 -2
  16. pygeodesy/auxilats/auxLat.py +5 -5
  17. pygeodesy/auxilats/auxily.py +2 -2
  18. pygeodesy/azimuthal.py +55 -65
  19. pygeodesy/basics.py +35 -34
  20. pygeodesy/booleans.py +37 -37
  21. pygeodesy/cartesianBase.py +26 -65
  22. pygeodesy/clipy.py +1 -1
  23. pygeodesy/constants.py +7 -7
  24. pygeodesy/css.py +8 -9
  25. pygeodesy/datums.py +1 -1
  26. pygeodesy/deprecated/__init__.py +2 -2
  27. pygeodesy/deprecated/bases.py +1 -1
  28. pygeodesy/deprecated/classes.py +10 -10
  29. pygeodesy/deprecated/consterns.py +1 -1
  30. pygeodesy/deprecated/datum.py +1 -1
  31. pygeodesy/deprecated/functions.py +23 -13
  32. pygeodesy/deprecated/nvector.py +1 -1
  33. pygeodesy/deprecated/rhumbBase.py +1 -1
  34. pygeodesy/deprecated/rhumbaux.py +1 -1
  35. pygeodesy/deprecated/rhumbsolve.py +1 -1
  36. pygeodesy/deprecated/rhumbx.py +1 -1
  37. pygeodesy/dms.py +1 -1
  38. pygeodesy/ecef.py +63 -69
  39. pygeodesy/elevations.py +1 -1
  40. pygeodesy/ellipsoidalBase.py +106 -121
  41. pygeodesy/ellipsoidalBaseDI.py +115 -119
  42. pygeodesy/ellipsoidalExact.py +36 -38
  43. pygeodesy/ellipsoidalGeodSolve.py +1 -1
  44. pygeodesy/ellipsoidalKarney.py +1 -1
  45. pygeodesy/ellipsoidalNvector.py +1 -1
  46. pygeodesy/ellipsoidalVincenty.py +6 -5
  47. pygeodesy/ellipsoids.py +7 -8
  48. pygeodesy/elliptic.py +6 -6
  49. pygeodesy/epsg.py +1 -1
  50. pygeodesy/errors.py +25 -25
  51. pygeodesy/etm.py +84 -76
  52. pygeodesy/fmath.py +54 -51
  53. pygeodesy/formy.py +74 -106
  54. pygeodesy/frechet.py +1 -1
  55. pygeodesy/fstats.py +1 -1
  56. pygeodesy/fsums.py +82 -72
  57. pygeodesy/gars.py +1 -1
  58. pygeodesy/geodesici.py +4 -4
  59. pygeodesy/geodesicw.py +16 -15
  60. pygeodesy/geodesicx/_C4_24.py +2 -2
  61. pygeodesy/geodesicx/_C4_27.py +2 -2
  62. pygeodesy/geodesicx/_C4_30.py +2 -2
  63. pygeodesy/geodesicx/__init__.py +3 -3
  64. pygeodesy/geodesicx/__main__.py +1 -1
  65. pygeodesy/geodesicx/gx.py +6 -5
  66. pygeodesy/geodesicx/gxarea.py +2 -2
  67. pygeodesy/geodesicx/gxbases.py +2 -2
  68. pygeodesy/geodesicx/gxline.py +16 -12
  69. pygeodesy/geodsolve.py +8 -17
  70. pygeodesy/geohash.py +1 -1
  71. pygeodesy/geoids.py +6 -6
  72. pygeodesy/hausdorff.py +1 -1
  73. pygeodesy/heights.py +3 -3
  74. pygeodesy/internals.py +64 -80
  75. pygeodesy/interns.py +2 -3
  76. pygeodesy/iters.py +1 -1
  77. pygeodesy/karney.py +4 -4
  78. pygeodesy/ktm.py +20 -21
  79. pygeodesy/latlonBase.py +296 -346
  80. pygeodesy/lazily.py +15 -15
  81. pygeodesy/lcc.py +5 -5
  82. pygeodesy/ltp.py +55 -59
  83. pygeodesy/ltpTuples.py +208 -192
  84. pygeodesy/mgrs.py +9 -10
  85. pygeodesy/named.py +153 -3
  86. pygeodesy/namedTuples.py +58 -7
  87. pygeodesy/nvectorBase.py +122 -105
  88. pygeodesy/osgr.py +10 -13
  89. pygeodesy/points.py +1 -1
  90. pygeodesy/props.py +3 -3
  91. pygeodesy/resections.py +26 -26
  92. pygeodesy/rhumb/__init__.py +2 -2
  93. pygeodesy/rhumb/aux_.py +2 -2
  94. pygeodesy/rhumb/bases.py +2 -2
  95. pygeodesy/rhumb/ekx.py +4 -4
  96. pygeodesy/rhumb/solve.py +4 -4
  97. pygeodesy/simplify.py +291 -403
  98. pygeodesy/solveBase.py +1 -1
  99. pygeodesy/sphericalBase.py +1 -1
  100. pygeodesy/sphericalNvector.py +84 -127
  101. pygeodesy/sphericalTrigonometry.py +66 -71
  102. pygeodesy/streprs.py +10 -5
  103. pygeodesy/trf.py +1 -1
  104. pygeodesy/triaxials.py +23 -16
  105. pygeodesy/units.py +17 -17
  106. pygeodesy/unitsBase.py +1 -1
  107. pygeodesy/ups.py +4 -4
  108. pygeodesy/utily.py +202 -145
  109. pygeodesy/utm.py +10 -10
  110. pygeodesy/utmups.py +1 -1
  111. pygeodesy/utmupsBase.py +1 -1
  112. pygeodesy/vector2d.py +17 -17
  113. pygeodesy/vector3d.py +32 -23
  114. pygeodesy/vector3dBase.py +22 -19
  115. pygeodesy/webmercator.py +5 -5
  116. pygeodesy/wgrs.py +5 -5
  117. PyGeodesy-24.10.24.dist-info/RECORD +0 -118
  118. {PyGeodesy-24.10.24.dist-info → PyGeodesy-24.12.12.dist-info}/top_level.txt +0 -0
pygeodesy/fsums.py CHANGED
@@ -64,7 +64,7 @@ from math import fabs, isinf, isnan, \
64
64
  ceil as _ceil, floor as _floor # PYCHOK used! .ltp
65
65
 
66
66
  __all__ = _ALL_LAZY.fsums
67
- __version__ = '24.10.22'
67
+ __version__ = '24.12.02'
68
68
 
69
69
  from pygeodesy.interns import (
70
70
  _PLUS_ as _add_op_, # in .auxilats.auxAngle
@@ -100,7 +100,7 @@ def _2finite(x, _isfine=_isfinite): # in .fstats
100
100
 
101
101
 
102
102
  def _2float(index=None, _isfine=_isfinite, **name_x): # in .fmath, .fstats
103
- '''(INTERNAL) Raise C{TypeError} or C{Overflow-/ValueError} if not finite.
103
+ '''(INTERNAL) Raise C{TypeError} or C{Overflow-/ValueError} if C{x} not finite.
104
104
  '''
105
105
  n, x = name_x.popitem() # _xkwds_item2(name_x)
106
106
  try:
@@ -163,9 +163,11 @@ except ImportError: # PYCHOK DSPACE! Python 3.12-
163
163
 
164
164
  _2n_d = None # redef
165
165
 
166
- def _fmaX(r, *a_b_c): # like Python 3.13+ I{Modules/mathmodule.c}:
167
- # raise a ValueError for a NAN result from non-NAN C{a_b_c}s or an
168
- # OverflowError for a non-NAN non-finite from all finite C{a_b_c}s.
166
+ def _fmaX(r, *a_b_c): # PYCHOK no cover
167
+ # handle non-finite as Python 3.13+ C-function U{math_fma_impl<https://
168
+ # GitHub.com/python/cpython/blob/main/Modules/mathmodule.c#L2305>}:
169
+ # raise a ValueError for a NAN result from non-NAN C{a_b_c}s or an
170
+ # OverflowError for a non-NAN non-finite from all finite C{a_b_c}s.
169
171
  if isnan(r):
170
172
  def _x(x):
171
173
  return not isnan(x)
@@ -212,11 +214,11 @@ except ImportError: # PYCHOK DSPACE! Python 3.12-
212
214
  return map(_2split3, xs)
213
215
 
214
216
 
215
- def f2product(*two):
217
+ def f2product(two=None):
216
218
  '''Turn accurate I{TwoProduct} multiplication on or off.
217
219
 
218
- @arg two: If C{True}, turn I{TwoProduct} on, if C{False} off or
219
- if C{None} or omitted, keep the current setting.
220
+ @kwarg two: If C{True}, turn I{TwoProduct} on, if C{False} off or
221
+ if C{None} or omitted, keep the current setting.
220
222
 
221
223
  @return: The previous setting (C{bool}).
222
224
 
@@ -226,12 +228,12 @@ def f2product(*two):
226
228
  equivalent, slower implementation when not available.
227
229
  '''
228
230
  t = Fsum._f2product
229
- if two and two[0] is not None:
230
- Fsum._f2product = bool(two[0])
231
+ if two is not None:
232
+ Fsum._f2product = bool(two)
231
233
  return t
232
234
 
233
235
 
234
- def _Fsumf_(*xs): # in .auxLat, .ltp, ...
236
+ def _Fsumf_(*xs): # in .auxLat, ...
235
237
  '''(INTERNAL) An C{Fsum(xs)}, all C{scalar}, an L{Fsum} or L{Fsum2Tuple}.
236
238
  '''
237
239
  return Fsum()._facc_scalarf(xs, up=False)
@@ -318,14 +320,14 @@ def _NonfiniteError(x):
318
320
  _ValueError if isnan(x) else _AssertionError)
319
321
 
320
322
 
321
- def nonfiniterrors(*raiser):
323
+ def nonfiniterrors(raiser=None):
322
324
  '''Throw C{OverflowError} and C{ValueError} exceptions for or
323
325
  handle I{non-finite} C{float}s as C{inf}, C{INF}, C{NINF},
324
326
  C{nan} and C{NAN} in summations and multiplications.
325
327
 
326
- @arg raiser: If C{True}, throw exceptions, if C{False} handle
327
- I{non-finites} or if C{None} or omitted, leave
328
- the setting unchanged.
328
+ @kwarg raiser: If C{True}, throw exceptions, if C{False} handle
329
+ I{non-finites} or if C{None} or omitted, leave
330
+ the setting unchanged.
329
331
 
330
332
  @return: Previous setting (C{bool}).
331
333
 
@@ -333,8 +335,8 @@ def nonfiniterrors(*raiser):
333
335
  C{nan} and C{NAN} a C{ValueError}.
334
336
  '''
335
337
  d = Fsum._isfine
336
- if raiser and raiser[0] is not None:
337
- Fsum._isfine = {} if bool(raiser[0]) else Fsum._nonfinites_isfine_kwds[True]
338
+ if raiser is not None:
339
+ Fsum._isfine = {} if bool(raiser) else Fsum._nonfinites_isfine_kwds[True]
338
340
  return (False if d is Fsum._nonfinites_isfine_kwds[True] else
339
341
  _xkwds_get1(d, _isfine=_isfinite) is _isfinite) if d else True
340
342
 
@@ -399,7 +401,7 @@ def _residue(other):
399
401
  return r
400
402
 
401
403
 
402
- def _s_r(s, r):
404
+ def _s_r2(s, r):
403
405
  '''(INTERNAL) Return C{(s, r)}, I{ordered}.
404
406
  '''
405
407
  if _isfinite(s):
@@ -413,24 +415,6 @@ def _s_r(s, r):
413
415
  return s, r
414
416
 
415
417
 
416
- def _2s_r(other):
417
- '''(INTERNAL) Return 2-tuple C{(other, r)} with C{other} as C{int},
418
- C{float} or C{as-is} and C{r} the residual of C{as-is} or 0.
419
- '''
420
- if _isFsum_2Tuple(other):
421
- s, r = other._fint2
422
- if r:
423
- s, r = other._nfprs2
424
- if r: # PYCHOK no cover
425
- s = other # L{Fsum} as-is
426
- else:
427
- r = 0
428
- s = other # C{type} as-is
429
- if isint(s, both=True):
430
- s = int(s)
431
- return s, r
432
-
433
-
434
418
  def _strcomplex(s, *args):
435
419
  '''(INTERNAL) C{Complex} 2- or 3-arg C{pow} error as C{str}.
436
420
  '''
@@ -487,6 +471,24 @@ def _threshold(threshold=_0_0, **kwds):
487
471
  raise ResidualError(threshold=threshold, cause=x)
488
472
 
489
473
 
474
+ def _2tuple2(other):
475
+ '''(INTERNAL) Return 2-tuple C{(other, r)} with C{other} as C{int},
476
+ C{float} or C{as-is} and C{r} the residual of C{as-is} or 0.
477
+ '''
478
+ if _isFsum_2Tuple(other):
479
+ s, r = other._fint2
480
+ if r:
481
+ s, r = other._nfprs2
482
+ if r: # PYCHOK no cover
483
+ s = other # L{Fsum} as-is
484
+ else:
485
+ r = 0
486
+ s = other # C{type} as-is
487
+ if isint(s, both=True):
488
+ s = int(s)
489
+ return s, r
490
+
491
+
490
492
  class Fsum(_Named): # sync __methods__ with .vector3dBase.Vector3dBase, .fstats, ...
491
493
  '''Precision floating point summation, I{running} summation and accurate multiplication.
492
494
 
@@ -645,10 +647,6 @@ class Fsum(_Named): # sync __methods__ with .vector3dBase.Vector3dBase, .fstats
645
647
  f = self._copy_2(self.__floordiv__)
646
648
  return f._floordiv(other, _floordiv_op_)
647
649
 
648
- def __format__(self, *other): # PYCHOK no cover
649
- '''Not implemented.'''
650
- return _NotImplemented(self, *other)
651
-
652
650
  def __ge__(self, other):
653
651
  '''Return C{(B{self} >= B{other})}, see C{__eq__}.
654
652
  '''
@@ -1171,6 +1169,14 @@ class Fsum(_Named): # sync __methods__ with .vector3dBase.Vector3dBase, .fstats
1171
1169
  return self._fadd(xs[0], **up) if len(xs) == 1 else \
1172
1170
  self._facc(xs, **up) # origin=1?
1173
1171
 
1172
+ def _facc_dot(self, n, xs, ys, **kwds): # in .fmath
1173
+ '''(INTERNAL) Accumulate C{fdot(B{xs}, *B{ys})}.
1174
+ '''
1175
+ if n > 0:
1176
+ _f = Fsum(**kwds)
1177
+ self._facc(_f(x).fmul(y) for x, y in zip(xs, ys)) # PYCHOK attr?
1178
+ return self
1179
+
1174
1180
  def _facc_neg(self, xs, **up_origin):
1175
1181
  '''(INTERNAL) Accumulate more C{xs}, negated.
1176
1182
  '''
@@ -1462,7 +1468,7 @@ class Fsum(_Named): # sync __methods__ with .vector3dBase.Vector3dBase, .fstats
1462
1468
  try:
1463
1469
  s, r = self._fprs2
1464
1470
  if r:
1465
- f = self._f2mul(self.fma, other1, **nonfinites)
1471
+ f = self._f2mul(self.fma, (other1,), **nonfinites)
1466
1472
  f += other2
1467
1473
  elif _residue(other1) or _residue(other2):
1468
1474
  fs = _2split3s(_fs(op, other1))
@@ -1501,36 +1507,41 @@ class Fsum(_Named): # sync __methods__ with .vector3dBase.Vector3dBase, .fstats
1501
1507
  @deprecated_method
1502
1508
  def f2mul(self, *others, **raiser):
1503
1509
  '''DEPRECATED on 2024.09.13, use method L{f2mul_<Fsum.f2mul_>}.'''
1504
- return self._fset(self.f2mul_(*others, **raiser))
1510
+ return self._fset(self.f2mul_(others, **raiser))
1505
1511
 
1506
- def f2mul_(self, *others, **nonfinites): # in .fmath.f2mul
1512
+ def f2mul_(self, *others, **f2product_nonfinites): # in .fmath.f2mul
1507
1513
  '''Return C{B{self} * B{other} * B{other} ...} for all B{C{others}} using cascaded,
1508
- accurate multiplication like with L{f2product<Fsum.f2product>} set to C{True}.
1514
+ accurate multiplication like with L{f2product<Fsum.f2product>}C{(B{True})}.
1509
1515
 
1510
1516
  @arg others: Multipliers (each C{scalar}, an L{Fsum} or L{Fsum2Tuple}), all
1511
1517
  positional.
1512
- @kwarg nonfinites: Use C{B{nonfinites}=True} or C{False}, to override both
1513
- L{nonfinites<Fsum.nonfinites>} and the L{nonfiniterrors}
1514
- default (C{bool}).
1518
+ @kwarg f2product_nonfinites: Use C{B{f2product=False}} to override the default
1519
+ C{True} and C{B{nonfinites}=True} or C{False}, to override
1520
+ settings L{nonfinites<Fsum.nonfinites>} and L{nonfiniterrors}.
1515
1521
 
1516
1522
  @return: The cascaded I{TwoProduct} (L{Fsum} or C{float}).
1517
1523
 
1518
1524
  @see: U{Equations 2.3<https://www.TUHH.De/ti3/paper/rump/OzOgRuOi06.pdf>}
1519
1525
  '''
1520
- return self._f2mul(self.f2mul_, *others, **nonfinites)
1526
+ return self._f2mul(self.f2mul_, others, **f2product_nonfinites)
1521
1527
 
1522
- def _f2mul(self, where, *others, **nonfinites_raiser):
1528
+ def _f2mul(self, where, others, f2product=True, **nonfinites_raiser):
1523
1529
  '''(INTERNAL) See methods C{fma} and C{f2mul_}.
1524
1530
  '''
1525
- f = self._copy_2(where)
1526
- ps = f._ps
1527
- if ps and others:
1528
- op = where.__name__
1529
- try:
1531
+ f = _Psum(self._ps, f2product=f2product, name=where.__name__)
1532
+ if others and f:
1533
+ if f.f2product():
1534
+ def _pfs(f, ps):
1535
+ return _2products(f, _2split3s(ps))
1536
+ else:
1537
+ def _pfs(f, ps): # PYCHOK redef
1538
+ return (f * p for p in ps)
1539
+
1540
+ op, ps = where.__name__, f._ps
1541
+ try: # as if self.f2product(True)
1530
1542
  for other in others: # to pinpoint errors
1531
1543
  for p in self._ps_other(op, other):
1532
- pfs = _2products(p, _2split3s(ps))
1533
- ps[:] = f._ps_acc([], pfs, up=False)
1544
+ ps[:] = f._ps_acc([], _pfs(p, ps), update=False)
1534
1545
  f._update()
1535
1546
  except TypeError as X:
1536
1547
  raise self._ErrorX(X, op, other)
@@ -1568,7 +1579,7 @@ class Fsum(_Named): # sync __methods__ with .vector3dBase.Vector3dBase, .fstats
1568
1579
  elif self.is_integer():
1569
1580
  # return an exact C{int} for C{int}**C{int}
1570
1581
  i, _ = self._fint2 # assert _ == 0
1571
- x, r = _2s_r(other) # C{int}, C{float} or other
1582
+ x, r = _2tuple2(other) # C{int}, C{float} or other
1572
1583
  f = self._Fsum_as(i)._pow_Fsum(other, op, **raiser_RESIDUAL) if r else \
1573
1584
  self._pow_2_3(i, x, other, op, **raiser_RESIDUAL)
1574
1585
  else: # mod[0] is None, power(self, other)
@@ -1634,9 +1645,9 @@ class Fsum(_Named): # sync __methods__ with .vector3dBase.Vector3dBase, .fstats
1634
1645
  # Fsum._ps_max = max(Fsum._ps_max, n)
1635
1646
  if n > 2:
1636
1647
  r = self._ps_1sum(s)
1637
- return Fsum2Tuple(*_s_r(s, r))
1648
+ return Fsum2Tuple(*_s_r2(s, r))
1638
1649
  if n > 1: # len(ps) == 2
1639
- s, r = _s_r(*_2sum(*ps, **self._isfine))
1650
+ s, r = _s_r2(*_2sum(*ps, **self._isfine))
1640
1651
  ps[:] = (r, s) if r else (s,)
1641
1652
  elif ps: # len(ps) == 1
1642
1653
  s = ps[0]
@@ -1662,9 +1673,8 @@ class Fsum(_Named): # sync __methods__ with .vector3dBase.Vector3dBase, .fstats
1662
1673
  def fset_(self, *xs):
1663
1674
  '''Apply C{B{self}.partials = Fsum(*B{xs}).partials}.
1664
1675
 
1665
- @arg xs: Optional, new values (each C{scalar} or
1666
- an L{Fsum} or L{Fsum2Tuple} instance), all
1667
- positional.
1676
+ @arg xs: Optional, new values (each C{scalar} or an L{Fsum}
1677
+ or L{Fsum2Tuple} instance), all positional.
1668
1678
 
1669
1679
  @return: This instance, replaced (C{Fsum}).
1670
1680
 
@@ -1839,7 +1849,7 @@ class Fsum(_Named): # sync __methods__ with .vector3dBase.Vector3dBase, .fstats
1839
1849
  s, r = _facc(xs, **facc_kwds)._fprs2
1840
1850
  if _isfinite(s): # _fsum(_1primed((s, -p, r, -q))
1841
1851
  d, r = _2sum(s - p, r - q, _isfine=_isOK)
1842
- r, _ = _s_r(d, r)
1852
+ r, _ = _s_r2(d, r)
1843
1853
  return s, (r if _isfinite(r) else _NONFINITEr)
1844
1854
  else:
1845
1855
  return p, _0_0
@@ -2174,7 +2184,7 @@ class Fsum(_Named): # sync __methods__ with .vector3dBase.Vector3dBase, .fstats
2174
2184
  return s
2175
2185
 
2176
2186
  b = _s(*(b._fprs2 if m is None else b._fint2))
2177
- x = _s(*_2s_r(x))
2187
+ x = _s(*_2tuple2(x))
2178
2188
 
2179
2189
  try:
2180
2190
  # 0**INF == 0.0, 1**INF == 1.0, -1**2.3 == -(1**2.3)
@@ -2309,11 +2319,11 @@ class Fsum(_Named): # sync __methods__ with .vector3dBase.Vector3dBase, .fstats
2309
2319
  return (p * f for f in fs)
2310
2320
 
2311
2321
  for p in ps:
2312
- for f in _pfs(p, fs):
2313
- yield f if _isfine(f) else _nfError(f)
2322
+ for x in _pfs(p, fs):
2323
+ yield x if _isfine(x) else _nfError(x)
2314
2324
 
2315
- fs = _psfs(self._ps, factors, **self._isfine)
2316
- f = _Psum(self._ps_acc([], fs, up=False), name=op)
2325
+ xs = _psfs(self._ps, factors, **self._isfine)
2326
+ f = _Psum(self._ps_acc([], xs, up=False), name=op)
2317
2327
  return f
2318
2328
 
2319
2329
  @property_RO
@@ -2597,7 +2607,7 @@ class Fsum2Tuple(_NamedTuple): # in .fstats
2597
2607
 
2598
2608
  @Property_RO
2599
2609
  def _Fsum(self): # this C{Fsum2Tuple} as L{Fsum}, in .fstats
2600
- s, r = _s_r(*self)
2610
+ s, r = _s_r2(*self)
2601
2611
  ps = (r, s) if r else (s,)
2602
2612
  return _Psum(ps, name=self.name)
2603
2613
 
@@ -2784,7 +2794,7 @@ def _xs(xs, _X=_X_ps, _x=float, _isfine=_isfinite, # defaults for Fsum._facc
2784
2794
  i, x = 0, xs
2785
2795
  try:
2786
2796
  for i, x in enumerate(_xiterable(xs)):
2787
- if isinstance(x, _Fsum_2Tuple_types):
2797
+ if _isFsum_2Tuple(x):
2788
2798
  for p in _X(x):
2789
2799
  yield p if _isfine(p) else _nfError(p)
2790
2800
  else:
@@ -2806,7 +2816,7 @@ def _xsum(which, xs, nonfinites=None, primed=0, **floats): # origin=0
2806
2816
  nonfinites = _xkwds_get1(floats, floats=nonfinites)
2807
2817
  elif nonfinites is None:
2808
2818
  nonfinites = not nonfiniterrors()
2809
- fs = _xs(xs, **_x_isfine(nonfinites, which=which))
2819
+ fs = _xs(xs, **_x_isfine(nonfinites, which=which)) # PYCHOK yield
2810
2820
  return _fsum(_1primed(fs) if primed else fs)
2811
2821
 
2812
2822
 
@@ -2837,7 +2847,7 @@ if __name__ == '__main__':
2837
2847
 
2838
2848
  # **) MIT License
2839
2849
  #
2840
- # Copyright (C) 2016-2024 -- mrJean1 at Gmail -- All Rights Reserved.
2850
+ # Copyright (C) 2016-2025 -- mrJean1 at Gmail -- All Rights Reserved.
2841
2851
  #
2842
2852
  # Permission is hereby granted, free of charge, to any person obtaining a
2843
2853
  # copy of this software and associated documentation files (the "Software"),
pygeodesy/gars.py CHANGED
@@ -345,7 +345,7 @@ __all__ += _ALL_DOCS(decode3, # functions
345
345
 
346
346
  # **) MIT License
347
347
  #
348
- # Copyright (C) 2016-2024 -- mrJean1 at Gmail -- All Rights Reserved.
348
+ # Copyright (C) 2016-2025 -- mrJean1 at Gmail -- All Rights Reserved.
349
349
  #
350
350
  # Permission is hereby granted, free of charge, to any person obtaining a
351
351
  # copy of this software and associated documentation files (the "Software"),
pygeodesy/geodesici.py CHANGED
@@ -51,12 +51,12 @@ from pygeodesy.solveBase import _SolveCapsBase, pairs
51
51
  # from pygeodesy.streprs import Fmt, unstr # from .ellipsoids
52
52
  from pygeodesy.units import Azimuth as Azi, Degrees, Float, Int, \
53
53
  _isDegrees, Lat, Lon, Meter, Meter_
54
- from pygeodesy.utily import sincos2, atan2, fabs, radians
54
+ from pygeodesy.utily import atan2, sincos2, fabs, radians
55
55
 
56
- # from math import atan2, ceil as _ceil, fabs, radians # .fsums, .utily
56
+ # from math import ceil as _ceil, fabs, radians # .fsums, .utily
57
57
 
58
58
  __all__ = _ALL_LAZY.geodesici
59
- __version__ = '24.10.22'
59
+ __version__ = '24.11.24'
60
60
 
61
61
  _0t = 0, # int
62
62
  _1_1t = -1, +1
@@ -1774,7 +1774,7 @@ if __name__ == '__main__': # MCCABE 14
1774
1774
 
1775
1775
  # **) MIT License
1776
1776
  #
1777
- # Copyright (C) 2024-2024 -- mrJean1 at Gmail -- All Rights Reserved.
1777
+ # Copyright (C) 2024-2025 -- mrJean1 at Gmail -- All Rights Reserved.
1778
1778
  #
1779
1779
  # Permission is hereby granted, free of charge, to any person obtaining a
1780
1780
  # copy of this software and associated documentation files (the "Software"),
pygeodesy/geodesicw.py CHANGED
@@ -39,7 +39,7 @@ from contextlib import contextmanager
39
39
  # from math import fabs # from .utily
40
40
 
41
41
  __all__ = _ALL_LAZY.geodesicw
42
- __version__ = '24.10.14'
42
+ __version__ = '24.11.02'
43
43
 
44
44
  _plumb_ = 'plumb'
45
45
  _TRIPS = 65
@@ -94,14 +94,14 @@ class _gWrapped(_kWrapped):
94
94
  if name:
95
95
  self._name, _ = _name2__(name, _or_nameof=E)
96
96
 
97
- def ArcDirect(self, lat1, lon1, azi1, a12, outmask=Caps._STD):
97
+ def ArcDirect(self, lat1, lon1, azi1, a12, outmask=Caps._STD): # PYCHOK no cover
98
98
  '''Return the C{_Geodesic.ArcDirect} result as L{GDict}.
99
99
  '''
100
100
  with _wargs(self, lat1, lon1, azi1, a12, outmask) as args:
101
101
  d = _Geodesic.ArcDirect(self, *args)
102
102
  return GDict(d)
103
103
 
104
- def ArcDirectLine(self, lat1, lon1, azi1, a12, caps=Caps._STD_LINE, **name):
104
+ def ArcDirectLine(self, lat1, lon1, azi1, a12, caps=Caps._STD_LINE, **name): # PYCHOK no cover
105
105
  '''Return the C{_Geodesic.ArcDirectLine} as I{wrapped} C{GeodesicLine}.
106
106
  '''
107
107
  return self._GenDirectLine(lat1, lon1, azi1, True, a12, caps, **name)
@@ -445,7 +445,7 @@ _wrapped = _gWrapped() # PYCHOK singleton, .ellipsoids, .test/base.py
445
445
 
446
446
  class Geodesic(_gWrapped): # overwritten by 1st instance
447
447
  '''I{Wrapper} around I{Karney}'s class U{geographiclib.geodesic.Geodesic
448
- <https://geographiclib.sourceforge.io/Python/doc/code.html>}.
448
+ <https://GeographicLib.SourceForge.io/Python/doc/code.html>}.
449
449
  '''
450
450
  def __new__(unused, a_ellipsoid=_EWGS84, f=None, **name):
451
451
  '''Return a I{wrapped} C{geodesic.Geodesic} instance from I{Karney}'s
@@ -465,7 +465,7 @@ class Geodesic(_gWrapped): # overwritten by 1st instance
465
465
 
466
466
  class GeodesicLine(_gWrapped): # overwritten by 1st instance
467
467
  '''I{Wrapper} around I{Karney}'s class U{geographiclib.geodesicline.GeodesicLine
468
- <https://geographiclib.sourceforge.io/Python/doc/code.html>}.
468
+ <https://GeographicLib.SourceForge.io/Python/doc/code.html>}.
469
469
  '''
470
470
  def __new__(unused, geodesic, lat1, lon1, azi1, caps=Caps._STD_LINE, **name):
471
471
  '''Return a I{wrapped} C{geodesicline.GeodesicLine} instance from I{Karney}'s
@@ -519,13 +519,12 @@ def _Intersecant2(gl, lat0, lon0, radius, tol=_TOL, form=F_D): # MCCABE in LatL
519
519
  n = _DUNDER_nameof(_Intersecant2)[1:]
520
520
  _P = gl.Position
521
521
  _I = gl.geodesic.Inverse
522
- _a = fabs
523
522
 
524
523
  def _R3(s):
525
524
  # radius, intersection, etc. at distance C{s}
526
525
  P = _P(s)
527
526
  d = _I(lat0, lon0, P.lat2, P.lon2)
528
- return _a(d.s12), P, d
527
+ return fabs(d.s12), P, d
529
528
 
530
529
  def _bisect2(s, c, Rc, r, tol, _R3):
531
530
  _s = Fsum(c).fsumf_
@@ -536,18 +535,20 @@ def _Intersecant2(gl, lat0, lon0, radius, tol=_TOL, form=F_D): # MCCABE in LatL
536
535
  break
537
536
  else: # b >>> s and c >>> s
538
537
  raise ValueError(Fmt.no_convergence(b, s))
539
- __2 = _0_5 # Rb > r > Rc
538
+ # Rb > r > Rc
540
539
  for i in range(_TRIPS): # 47-48
541
- s = (b + c) * __2
540
+ s = (b + c) * _0_5
542
541
  R, P, d = _R3(s)
543
542
  if Rb > R > r:
544
543
  b, Rb = s, R
545
544
  elif Rc < R < r:
546
545
  c, Rc = s, R
547
- t = _a(b - c)
548
- if t < tol: # or _a(R - r) < tol:
546
+ # else:
547
+ # break
548
+ t = fabs(b - c)
549
+ if t < tol: # or fabs(R - r) < tol:
549
550
  break
550
- else: # t = min(t, _a(R - r))
551
+ else: # t = min(t, fabs(R - r))
551
552
  raise ValueError(Fmt.no_convergence(t, tol))
552
553
  i += C.iteration # combine iterations
553
554
  P.set_(lat0=lat0, lon0=lon0, azi0=d.azi1, iteration=i,
@@ -558,13 +559,13 @@ def _Intersecant2(gl, lat0, lon0, radius, tol=_TOL, form=F_D): # MCCABE in LatL
558
559
  # one the plumb, pseudo-rhumb line to the other
559
560
  C = _PlumbTo(gl, lat0, lon0, tol=tol)
560
561
  try:
561
- a = _a(C.s02) # distance between centers
562
+ a = fabs(C.s02) # distance between centers
562
563
  if a < r:
563
564
  c = C.s12 # distance along pseudo-rhumb line
564
565
  h = _copysign(r, c) # past half chord length
565
566
  P, p = _bisect2( h, c, a, r, tol, _R3)
566
567
  Q, q = _bisect2(-h, c, a, r, tol, _R3)
567
- if _a(p - q) < max(EPS, tol):
568
+ if fabs(p - q) < max(EPS, tol):
568
569
  Q = P
569
570
  elif a > r:
570
571
  raise ValueError(_too_(Fmt.distant(a)))
@@ -587,7 +588,7 @@ def _PlumbTo(gl, lat0, lon0, est=None, tol=_TOL):
587
588
 
588
589
  # **) MIT License
589
590
  #
590
- # Copyright (C) 2016-2024 -- mrJean1 at Gmail -- All Rights Reserved.
591
+ # Copyright (C) 2016-2025 -- mrJean1 at Gmail -- All Rights Reserved.
591
592
  #
592
593
  # Permission is hereby granted, free of charge, to any person obtaining a
593
594
  # copy of this software and associated documentation files (the "Software"),
@@ -4,7 +4,7 @@
4
4
  u'''A Python version of part of I{Karney}'s C++ module U{GeodesicExactC4
5
5
  <https://GeographicLib.SourceForge.io/C++/doc/classGeographicLib_1_1GeodesicExactC4.html>}.
6
6
 
7
- Copyright (C) U{Charles Karney<mailto:Karney@Alum.MIT.edu>} (2008-2023)
7
+ Copyright (C) U{Charles Karney<mailto:Karney@Alum.MIT.edu>} (2008-2024)
8
8
  and licensed under the MIT/X11 License. For more information, see the
9
9
  U{GeographicLib<https://GeographicLib.SourceForge.io>} documentation.
10
10
  '''
@@ -1676,7 +1676,7 @@ del _g, _Gfloats, _f, _f2
1676
1676
 
1677
1677
  # **) MIT License
1678
1678
  #
1679
- # Copyright (C) 2016-2024 -- mrJean1 at Gmail -- All Rights Reserved.
1679
+ # Copyright (C) 2016-2025 -- mrJean1 at Gmail -- All Rights Reserved.
1680
1680
  #
1681
1681
  # Permission is hereby granted, free of charge, to any person obtaining a
1682
1682
  # copy of this software and associated documentation files (the "Software"),
@@ -4,7 +4,7 @@
4
4
  u'''A Python version of part of I{Karney}'s C++ module U{GeodesicExactC4
5
5
  <https://GeographicLib.SourceForge.io/C++/doc/classGeographicLib_1_1GeodesicExactC4.html>}.
6
6
 
7
- Copyright (C) U{Charles Karney<mailto:Karney@Alum.MIT.edu>} (2008-2023)
7
+ Copyright (C) U{Charles Karney<mailto:Karney@Alum.MIT.edu>} (2008-2024)
8
8
  and licensed under the MIT/X11 License. For more information, see the
9
9
  U{GeographicLib<https://GeographicLib.SourceForge.io>} documentation.
10
10
  '''
@@ -2372,7 +2372,7 @@ del _g, _Gfloats, _f, _f2
2372
2372
 
2373
2373
  # **) MIT License
2374
2374
  #
2375
- # Copyright (C) 2016-2024 -- mrJean1 at Gmail -- All Rights Reserved.
2375
+ # Copyright (C) 2016-2025 -- mrJean1 at Gmail -- All Rights Reserved.
2376
2376
  #
2377
2377
  # Permission is hereby granted, free of charge, to any person obtaining a
2378
2378
  # copy of this software and associated documentation files (the "Software"),
@@ -4,7 +4,7 @@
4
4
  u'''A Python version of part of I{Karney}'s C++ module U{GeodesicExactC4
5
5
  <https://GeographicLib.SourceForge.io/C++/doc/classGeographicLib_1_1GeodesicExactC4.html>}.
6
6
 
7
- Copyright (C) U{Charles Karney<mailto:Karney@Alum.MIT.edu>} (2008-2023)
7
+ Copyright (C) U{Charles Karney<mailto:Karney@Alum.MIT.edu>} (2008-2024)
8
8
  and licensed under the MIT/X11 License. For more information, see the
9
9
  U{GeographicLib<https://GeographicLib.SourceForge.io>} documentation.
10
10
  '''
@@ -3278,7 +3278,7 @@ del _g, _Gfloats, _f, _f2
3278
3278
 
3279
3279
  # **) MIT License
3280
3280
  #
3281
- # Copyright (C) 2016-2024 -- mrJean1 at Gmail -- All Rights Reserved.
3281
+ # Copyright (C) 2016-2025 -- mrJean1 at Gmail -- All Rights Reserved.
3282
3282
  #
3283
3283
  # Permission is hereby granted, free of charge, to any person obtaining a
3284
3284
  # copy of this software and associated documentation files (the "Software"),
@@ -4,7 +4,7 @@
4
4
  u'''A pure Python version of I{Karney}'s C++ classes U{GeodesicExact
5
5
  <https://GeographicLib.SourceForge.io/C++/doc/classGeographicLib_1_1GeodesicExact.html>}
6
6
  and U{GeodesicLineExact
7
- <https://geographiclib.sourceforge.io/C++/doc/classGeographicLib_1_1GeodesicLine.html>}.
7
+ <https://GeographicLib.SourceForge.io/C++/doc/classGeographicLib_1_1GeodesicLine.html>}.
8
8
 
9
9
  For more details, see the C++ U{GeographicLib<https://GeographicLib.SourceForge.io/C++/doc/index.html>}
10
10
  documentation, especially the U{Class List<https://GeographicLib.SourceForge.io/C++/doc/annotated.html>}
@@ -23,11 +23,11 @@ from pygeodesy.karney import Caps, GeodesicError
23
23
  from pygeodesy.lazily import _ALL_DOCS, _ALL_LAZY
24
24
 
25
25
  __all__ = _ALL_LAZY.geodesicx + _ALL_DOCS(Caps, GeodesicError)
26
- __version__ = '24.09.06'
26
+ __version__ = '24.11.02'
27
27
 
28
28
  # **) MIT License
29
29
  #
30
- # Copyright (C) 2016-2024 -- mrJean1 at Gmail -- All Rights Reserved.
30
+ # Copyright (C) 2016-2025 -- mrJean1 at Gmail -- All Rights Reserved.
31
31
  #
32
32
  # Permission is hereby granted, free of charge, to any person obtaining a
33
33
  # copy of this software and associated documentation files (the "Software"),
@@ -65,7 +65,7 @@ _main(C4order=int(argv[1])) if len(argv) == 2 and argv[1].isdigit() else _main()
65
65
 
66
66
  # **) MIT License
67
67
  #
68
- # Copyright (C) 2016-2024 -- mrJean1 at Gmail -- All Rights Reserved.
68
+ # Copyright (C) 2016-2025 -- mrJean1 at Gmail -- All Rights Reserved.
69
69
  #
70
70
  # Permission is hereby granted, free of charge, to any person obtaining a
71
71
  # copy of this software and associated documentation files (the "Software"),
pygeodesy/geodesicx/gx.py CHANGED
@@ -8,7 +8,7 @@ Class L{GeodesicExact} follows the naming, methods and return values
8
8
  of class C{Geodesic} from I{Karney}'s Python U{geographiclib
9
9
  <https://GitHub.com/geographiclib/geographiclib-python>}.
10
10
 
11
- Copyright (C) U{Charles Karney<mailto:Karney@Alum.MIT.edu>} (2008-2023)
11
+ Copyright (C) U{Charles Karney<mailto:Karney@Alum.MIT.edu>} (2008-2024)
12
12
  and licensed under the MIT/X11 License. For more information, see the
13
13
  U{GeographicLib<https://GeographicLib.SourceForge.io>} documentation.
14
14
  '''
@@ -58,12 +58,13 @@ from pygeodesy.lazily import _ALL_DOCS, _ALL_MODS as _MODS
58
58
  from pygeodesy.namedTuples import Destination3Tuple, Distance3Tuple
59
59
  from pygeodesy.props import deprecated_Property, Property, Property_RO, property_RO
60
60
  # from pygeodesy.streprs import Fmt # from .fmath
61
- from pygeodesy.utily import atan2d as _atan2d_reverse, _unrollon, _Wrap, wrap360
61
+ from pygeodesy.utily import atan2, atan2d as _atan2d_reverse, _unrollon, \
62
+ _Wrap, wrap360
62
63
 
63
- from math import atan2, copysign, cos, degrees, fabs, radians, sqrt
64
+ from math import copysign, cos, degrees, fabs, radians, sqrt
64
65
 
65
66
  __all__ = ()
66
- __version__ = '24.08.13'
67
+ __version__ = '24.11.24'
67
68
 
68
69
  _MAXIT1 = 20
69
70
  _MAXIT2 = 10 + _MAXIT1 + MANT_DIG # MANT_DIG == C++ digits
@@ -1346,7 +1347,7 @@ __all__ += _ALL_DOCS(GeodesicExact, GeodesicLineExact)
1346
1347
 
1347
1348
  # **) MIT License
1348
1349
  #
1349
- # Copyright (C) 2016-2024 -- mrJean1 at Gmail -- All Rights Reserved.
1350
+ # Copyright (C) 2016-2025 -- mrJean1 at Gmail -- All Rights Reserved.
1350
1351
  #
1351
1352
  # Permission is hereby granted, free of charge, to any person obtaining a
1352
1353
  # copy of this software and associated documentation files (the "Software"),
@@ -10,7 +10,7 @@ Class L{GeodesicAreaExact} is intended to work with instances
10
10
  of class L{GeodesicExact} and of I{wrapped} class C{Geodesic},
11
11
  see module L{pygeodesy.karney}.
12
12
 
13
- Copyright (C) U{Charles Karney<mailto:Karney@Alum.MIT.edu>} (2008-2023)
13
+ Copyright (C) U{Charles Karney<mailto:Karney@Alum.MIT.edu>} (2008-2024)
14
14
  and licensed under the MIT/X11 License. For more information, see the
15
15
  U{GeographicLib<https://GeographicLib.SourceForge.io>} documentation.
16
16
  '''
@@ -518,7 +518,7 @@ __all__ += _ALL_DOCS(GeodesicAreaExact, PolygonArea)
518
518
 
519
519
  # **) MIT License
520
520
  #
521
- # Copyright (C) 2016-2024 -- mrJean1 at Gmail -- All Rights Reserved.
521
+ # Copyright (C) 2016-2025 -- mrJean1 at Gmail -- All Rights Reserved.
522
522
  #
523
523
  # Permission is hereby granted, free of charge, to any person obtaining a
524
524
  # copy of this software and associated documentation files (the "Software"),
@@ -3,7 +3,7 @@
3
3
 
4
4
  u'''(INTERNAL) Private L{geodesicx} base class, functions and constants.
5
5
 
6
- Copyright (C) U{Charles Karney<mailto:Karney@Alum.MIT.edu>} (2008-2023)
6
+ Copyright (C) U{Charles Karney<mailto:Karney@Alum.MIT.edu>} (2008-2024)
7
7
  and licensed under the MIT/X11 License. For more information, see the
8
8
  U{GeographicLib<https://GeographicLib.SourceForge.io>} documentation.
9
9
  '''
@@ -158,7 +158,7 @@ def _xnC4(**name_nC4):
158
158
 
159
159
  # **) MIT License
160
160
  #
161
- # Copyright (C) 2016-2024 -- mrJean1 at Gmail -- All Rights Reserved.
161
+ # Copyright (C) 2016-2025 -- mrJean1 at Gmail -- All Rights Reserved.
162
162
  #
163
163
  # Permission is hereby granted, free of charge, to any person obtaining a
164
164
  # copy of this software and associated documentation files (the "Software"),