pygeodesy 24.7.7__py2.py3-none-any.whl → 24.7.24__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/ellipsoids.py CHANGED
@@ -83,7 +83,7 @@ from pygeodesy.named import _lazyNamedEnumItem as _lazy, _name__, _NamedEnum, \
83
83
  _NamedEnumItem, _NamedTuple, _Pass, _ALL_LAZY, _MODS
84
84
  from pygeodesy.namedTuples import Distance2Tuple, Vector3Tuple, Vector4Tuple
85
85
  from pygeodesy.props import deprecated_Property_RO, Property_RO, property_doc_, \
86
- deprecated_property_RO, property_RO
86
+ deprecated_property_RO, property_RO, property_ROver
87
87
  from pygeodesy.streprs import Fmt, fstr, instr, strs, unstr
88
88
  # from pygeodesy.triaxials import _hartzell3 # _MODS
89
89
  from pygeodesy.units import Bearing_, Distance, Float, Float_, Height, Lamd, Lat, Meter, \
@@ -93,7 +93,7 @@ from pygeodesy.utily import atan1, atan1d, atan2b, degrees90, m2radians, radians
93
93
  from math import asinh, atan, atanh, cos, degrees, exp, fabs, radians, sin, sinh, sqrt, tan
94
94
 
95
95
  __all__ = _ALL_LAZY.ellipsoids
96
- __version__ = '24.06.24'
96
+ __version__ = '24.07.16'
97
97
 
98
98
  _f_0_0 = Float(f =_0_0) # zero flattening
99
99
  _f__0_0 = Float(f_=_0_0) # zero inverse flattening
@@ -1029,17 +1029,18 @@ class Ellipsoid(_NamedEnumItem):
1029
1029
  raise _ValueError(exact=g, ellipsoid=E, txt_not_=self.name)
1030
1030
  return g
1031
1031
 
1032
- @property_RO
1032
+ @property_ROver
1033
1033
  def _Geodesics(self):
1034
1034
  '''(INTERNAL) Get all C{Geodesic...} classes, I{once}.
1035
1035
  '''
1036
+ t = (_MODS.geodesicx.GeodesicExact,
1037
+ _MODS.geodsolve.GeodesicSolve)
1036
1038
  try:
1037
- t = _MODS.geodesicw._wrapped.Geodesic,
1039
+ t += (_MODS.geodesicw.Geodesic,
1040
+ _MODS.geodesicw._wrapped.Geodesic)
1038
1041
  except ImportError:
1039
- t = ()
1040
- Ellipsoid._Geodesics = t = (_MODS.geodesicx.GeodesicExact, # overwrite property_RO
1041
- _MODS.geodsolve.GeodesicSolve) + t
1042
- return t
1042
+ pass
1043
+ return t # overwrite propertyROver
1043
1044
 
1044
1045
  @property_RO
1045
1046
  def geodesicw(self):
@@ -1517,14 +1518,13 @@ class Ellipsoid(_NamedEnumItem):
1517
1518
  # raise _IsnotError(_ellipsoidal_, ellipsoid=self)
1518
1519
  return _MODS.rhumb.ekx.Rhumb(self, name=self.name)
1519
1520
 
1520
- @property_RO
1521
+ @property_ROver
1521
1522
  def _Rhumbs(self):
1522
1523
  '''(INTERNAL) Get all C{Rhumb...} classes, I{once}.
1523
1524
  '''
1524
1525
  p = _MODS.rhumb
1525
- Ellipsoid._Rhumbs = t = (p.aux_.RhumbAux, # overwrite property_RO
1526
- p.ekx.Rhumb, p.solve.RhumbSolve)
1527
- return t
1526
+ return (p.aux_.RhumbAux, # overwrite propertyROver
1527
+ p.ekx.Rhumb, p.solve.RhumbSolve)
1528
1528
 
1529
1529
  @property
1530
1530
  def rhumbsolve(self):
pygeodesy/fsums.py CHANGED
@@ -273,11 +273,17 @@ def _stresidual(prefix, residual, R=0, **mod_ratio):
273
273
  def _2sum(a, b): # by .testFmath
274
274
  '''(INTERNAL) Return C{a + b} as 2-tuple (sum, residual).
275
275
  '''
276
+ # Neumaier, A. U{Rundungsfehleranalyse einiger Verfahren zur Summation endlicher
277
+ # Summen<https://OnlineLibrary.Wiley.com/doi/epdf/10.1002/zamm.19740540106>},
278
+ # 1974, Zeitschrift für Angewandte Mathmatik und Mechanik, vol 51, nr 1, p 39-51
279
+ # <https://StackOverflow.com/questions/78633770/can-neumaier-summation-be-sped-up>
276
280
  s = a + b
277
281
  if _isfinite(s):
278
282
  if fabs(a) < fabs(b):
279
- b, a = a, b
280
- return s, (b - (s - a))
283
+ r = (b - s) + a
284
+ else:
285
+ r = (a - s) + b
286
+ return s, r
281
287
  u = unstr(_2sum, a, b)
282
288
  t = Fmt.PARENSPACED(_not_finite_, s)
283
289
  raise _OverflowError(u, txt=t)
@@ -1909,10 +1915,10 @@ class Fsum(_Named): # sync __methods__ with .vector3dBase.Vector3dBase
1909
1915
 
1910
1916
  @raise ResidualError: Invalid B{C{threshold}}.
1911
1917
 
1912
- @note: L{ResidualError}s may be thrown if the non-zero I{ratio}
1913
- C{residual / fsum} exceeds the given B{C{threshold}} and
1914
- if the C{residual} is non-zero and I{significant} vs the
1915
- C{fsum}, i.e. C{(fsum + residual) != fsum} and if optional
1918
+ @note: L{ResidualError}s may be thrown if (1) the non-zero I{ratio}
1919
+ C{residual / fsum} exceeds the given B{C{threshold}} and (2)
1920
+ the C{residual} is non-zero and (3) I{significant} vs the
1921
+ C{fsum}, i.e. C{(fsum + residual) != fsum} and (4) optional
1916
1922
  keyword argument C{raiser=False} is missing. Specify a
1917
1923
  negative B{C{threshold}} for only non-zero C{residual}
1918
1924
  testing without I{significant}.