pygeodesy 24.9.24__py2.py3-none-any.whl → 24.9.29__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-24.9.24.dist-info → PyGeodesy-24.9.29.dist-info}/METADATA +3 -3
- {PyGeodesy-24.9.24.dist-info → PyGeodesy-24.9.29.dist-info}/RECORD +15 -15
- pygeodesy/__init__.py +1 -1
- pygeodesy/basics.py +5 -5
- pygeodesy/booleans.py +3 -4
- pygeodesy/constants.py +4 -2
- pygeodesy/ellipsoidalBaseDI.py +4 -4
- pygeodesy/errors.py +9 -1
- pygeodesy/fmath.py +20 -19
- pygeodesy/formy.py +2 -1
- pygeodesy/fstats.py +6 -6
- pygeodesy/fsums.py +260 -212
- pygeodesy/streprs.py +14 -7
- {PyGeodesy-24.9.24.dist-info → PyGeodesy-24.9.29.dist-info}/WHEEL +0 -0
- {PyGeodesy-24.9.24.dist-info → PyGeodesy-24.9.29.dist-info}/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: PyGeodesy
|
|
3
|
-
Version: 24.9.
|
|
3
|
+
Version: 24.9.29
|
|
4
4
|
Summary: Pure Python geodesy tools
|
|
5
5
|
Home-page: https://GitHub.com/mrJean1/PyGeodesy
|
|
6
6
|
Author: Jean M. Brouwers
|
|
@@ -8,7 +8,7 @@ Author-email: mrJean1@Gmail.com
|
|
|
8
8
|
Maintainer: Jean M. Brouwers
|
|
9
9
|
Maintainer-email: mrJean1@Gmail.com
|
|
10
10
|
License: MIT
|
|
11
|
-
Keywords: AER Albers altitude Andoyer annulus antipode area attitude Authalic auxiliary azimuth azimuthal azimuth-elevation-range bearing bank Barsky Barth beta bi-quadratic boolean cached Cagnoli cartesian Cassini Cassini-Soldner chord circle-intersections circumcenter circumcircle circumradius clip Cohen Cohen-Sutherland Collins composite conformal conic constants contact-triangle Cook Correia cosines-law coverage curvature cylindrical datum deprecation deficit development discrete distance Douglas earth east-north-up eccentricity ECEF elevation ellipsoid ellipsoidal-latitude-beta ellipsoidal-longitude-omega elliptic ENU EPSG equal-area equidistant equirectangular ETM ETRF Euclidean even-odd-rule ExactTM excess Farrell Farrell-Barth Field-Of-View flattening fma fmath footprint Forster Forster-Hormann-Popa Forsythe FOV fractional Frechet Fréchet frustum Fsum fused-multiply-add GARS geocentric GeoConvert GeodesicExact geodesy geodetic GeodSolve GeodTest geographiclib Geohash geoid geoidHeight GeoidHeights georef Girard gnomonic gons grades gradians Greiner Greiner-Hormann Hartzell Hausdorff Haversine heading height Heron Hodgman horizon Hormann Hubeny IDW incenter incirle infix_@_operator inradius intermediate interpolate intersect intersection intersection3d intersections IntersectTool Inverse-Distance-Weighting Isometric ITRF Jacobi Jacobi-Conformal Jarque-Bera Jekel Karney Krueger Krüger kurtosis Lambert latitude law-of-cosines least-squares Lesh L_Huilier LHuilier Liang Liang-Barsky linearize Line-Of-Sight LocalCartesian local-tangent-plane local-x-y-z longitude LOS loxodrome lstsq LTP lune LV03 LV95 mean memoize memoized Mercator Meeus MGRS nearest NED Niemeyer normalize Norrdine north-east-down numpy n-vector Nvector oblate omega orthographic orthometric-height OSGB OSGR overlap parallel parallel-of-latitude Parametric path-intersection perimeter Peucker Pierlot pitch plumb Point-Of-View polar Popa POV precision-cubic-root precision-hypotenuse precision-powers precision-running-summation precision-square-root precision-summation prolate Pseudo-Mercator PyGeodesy PyInstaller PyPy quartic radical radii radius Ramer Ramer-Douglas-Peucker Rectifying Reduced resect resection Rey-Jer Reumann Reumann-Witkam rhumb RhumbSolve running-linear-regression running-statistics running-stats running-summation scipy secant semi-perimeter sexagecimal simplify skewness Snellius Snellius-Pothenot Snyder Soddy Soddy-circles Soldner sphere sphere-intersections spherical-deficit spherical-excess spherical-triangle squared-quartic standard-deviation stereographic Sudano surface-area Sutherland Sutherland-Hodgman tangent-circles Terrestrial-Reference-Frame Thomas Tienstra tilt TMcoords TMExact toise transverse TransverseMercatorExact TRF triangle triangulate triaxial triaxial-ellipsoid trigonometry trilaterate trilaterate-2d trilaterate-3d TwoProduct TwoSum umbilic-point unit unroll UPS UTM UTM/UPS variance velocities Veness Vermeille viewing-frustum Vincenty Visvalingam Visvalingam-Whyatt volume volumetric Web-Mercator Welford WGRS WGS Whyatt Wildberger Witkam winding-number XYZ yaw You zenzi-cubic zenzi-quartic
|
|
11
|
+
Keywords: AER Albers altitude Andoyer annulus antipode area attitude Authalic auxiliary azimuth azimuthal azimuth-elevation-range bearing bank Barsky Barth beta bi-quadratic boolean cached Cagnoli cartesian Cassini Cassini-Soldner chord circle-intersections circumcenter circumcircle circumradius clip Cohen Cohen-Sutherland Collins composite conformal conic constants contact-triangle Cook Correia cosines-law coverage curvature cylindrical datum deprecation deficit development discrete distance Douglas earth east-north-up eccentricity ECEF elevation ellipsoid ellipsoidal-latitude-beta ellipsoidal-longitude-omega elliptic ENU EPSG equal-area equidistant equirectangular ETM ETRF Euclidean even-odd-rule ExactTM excess Farrell Farrell-Barth Field-Of-View flattening fma fmath footprint Forster Forster-Hormann-Popa Forsythe FOV fractional Frechet Fréchet frustum Fsum fused-multiply-add GARS geocentric GeoConvert GeodesicExact geodesy geodetic GeodSolve GeodTest geographiclib Geohash geoid geoidHeight GeoidHeights georef Girard gnomonic gons grades gradians Greiner Greiner-Hormann Hartzell Hausdorff Haversine heading height Heron Hodgman horizon Hormann Hubeny IDW incenter incirle infix_@_operator inradius intermediate interpolate intersect intersection intersection3d intersections IntersectTool Inverse-Distance-Weighting Isometric ITRF Jacobi Jacobi-Conformal Jarque-Bera Jekel Karney Krueger Krüger kurtosis Lambert latitude law-of-cosines least-squares Lesh L_Huilier LHuilier Liang Liang-Barsky linearize Line-Of-Sight LocalCartesian local-tangent-plane local-x-y-z longitude LOS loxodrome lstsq LTP lune LV03 LV95 mean memoize memoized Mercator Meeus MGRS nearest NED Niemeyer non-finite normalize Norrdine north-east-down numpy n-vector Nvector oblate omega orthographic orthometric-height OSGB OSGR overlap parallel parallel-of-latitude Parametric path-intersection perimeter Peucker Pierlot pitch plumb Point-Of-View polar Popa POV precision-cubic-root precision-hypotenuse precision-powers precision-running-summation precision-square-root precision-summation prolate Pseudo-Mercator PyGeodesy PyInstaller PyPy quartic radical radii radius Ramer Ramer-Douglas-Peucker Rectifying Reduced resect resection Rey-Jer Reumann Reumann-Witkam rhumb RhumbSolve running-linear-regression running-statistics running-stats running-summation scipy secant semi-perimeter sexagecimal simplify skewness Snellius Snellius-Pothenot Snyder Soddy Soddy-circles Soldner sphere sphere-intersections spherical-deficit spherical-excess spherical-triangle squared-quartic standard-deviation stereographic Sudano surface-area Sutherland Sutherland-Hodgman tangent-circles Terrestrial-Reference-Frame Thomas Tienstra tilt TMcoords TMExact toise transverse TransverseMercatorExact TRF triangle triangulate triaxial triaxial-ellipsoid trigonometry trilaterate trilaterate-2d trilaterate-3d TwoProduct TwoSum umbilic-point unit unroll UPS UTM UTM/UPS variance velocities Veness Vermeille viewing-frustum Vincenty Visvalingam Visvalingam-Whyatt volume volumetric Web-Mercator Welford WGRS WGS Whyatt Wildberger Witkam winding-number XYZ yaw You zenzi-cubic zenzi-quartic
|
|
12
12
|
Classifier: Development Status :: 5 - Production/Stable
|
|
13
13
|
Classifier: Environment :: Console
|
|
14
14
|
Classifier: Intended Audience :: Developers
|
|
@@ -160,7 +160,7 @@ and McCabe_ using Python 2.7.18 and with Flake8_ using Python 3.11.5, both in 64
|
|
|
160
160
|
|
|
161
161
|
For a summary of all *Karney*-based functionality in ``pygeodesy``, see module karney_.
|
|
162
162
|
|
|
163
|
-
*Last updated: Sep
|
|
163
|
+
*Last updated: Sep 29, 2024.*
|
|
164
164
|
|
|
165
165
|
License
|
|
166
166
|
=======
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
pygeodesy/LICENSE,sha256=YfgAiyxOwY6P9Kkb1_5XN81nueTLrpb3Ffkv3EuPgFU,1144
|
|
2
|
-
pygeodesy/__init__.py,sha256=
|
|
2
|
+
pygeodesy/__init__.py,sha256=MPSm_QycgTQamFcQG7hsKLKULgZK4MscaLnEOmrqUq0,42475
|
|
3
3
|
pygeodesy/__main__.py,sha256=OupAiDFT_RXFw1Lh6C8bVG9NaonV_Wy6jibN_hA4aJg,5442
|
|
4
4
|
pygeodesy/albers.py,sha256=JXqeWAteV2N601e5R-D7bCsa8qAYv3oWm7M3R4uszXM,31078
|
|
5
5
|
pygeodesy/azimuthal.py,sha256=erI5DTM0-Nr5YC2LnBTVNbUKlrnnXJUwKe0SCQ7-Soc,50223
|
|
6
|
-
pygeodesy/basics.py,sha256=
|
|
7
|
-
pygeodesy/booleans.py,sha256=
|
|
6
|
+
pygeodesy/basics.py,sha256=JPANq5maTBqd4PhHIO4TLCfl9SG0D0n6OiUF421p1bQ,30163
|
|
7
|
+
pygeodesy/booleans.py,sha256=gEh1bWdHEoSv-4yp0M9JE73xa4DLwLllgKC9d0mNLwM,73460
|
|
8
8
|
pygeodesy/cartesianBase.py,sha256=jzPJR4_3Yp5jmK7A5inGOXskDebs7YMdjQzINHjzkP8,46935
|
|
9
9
|
pygeodesy/clipy.py,sha256=hzI6IutTRkbssjPPgAjXv9OcgCIIZchjnMWaHin4YAU,27728
|
|
10
|
-
pygeodesy/constants.py,sha256=
|
|
10
|
+
pygeodesy/constants.py,sha256=E3ANfteZK05I89wbGP4Noxms0pT2TKBOyaVSv8jmlxg,19673
|
|
11
11
|
pygeodesy/css.py,sha256=rPr5EcGm_blVt72h-851ytpVxdPhx1MEqqGs3Ppx3eI,25651
|
|
12
12
|
pygeodesy/datums.py,sha256=-m9-cvUVOaJ92eeFgc3O54lel3WqnVYcS7o6WCXkNyw,34043
|
|
13
13
|
pygeodesy/dms.py,sha256=QxiRtyc8QSiW-egm6Mrcrgmi_deWz3YnYwIm82JS4TU,44443
|
|
14
14
|
pygeodesy/ecef.py,sha256=_yy_TIUGsXmEZ7aRcmchbJwTp7x__edx6EPiS3Xznes,59587
|
|
15
15
|
pygeodesy/elevations.py,sha256=4FuVcVNb_D09gmcvUlck344N4f7Jms76SIRrdutvKjk,10801
|
|
16
16
|
pygeodesy/ellipsoidalBase.py,sha256=IDu0-cKGhkCk3Aj16DJXt2gxjGYsFcjSTrvwG5GbATs,55385
|
|
17
|
-
pygeodesy/ellipsoidalBaseDI.py,sha256=
|
|
17
|
+
pygeodesy/ellipsoidalBaseDI.py,sha256=wsUcdVdp1Tcs8IOS6bM773tAShIOqt_yscRFU2oiehI,38397
|
|
18
18
|
pygeodesy/ellipsoidalExact.py,sha256=wmIGgZyd0cvjswP4KOeDuEcuagjwQQRRq1cmseRoD-Q,16946
|
|
19
19
|
pygeodesy/ellipsoidalGeodSolve.py,sha256=fAT4b3HXkM6i1W_C0rb4vbSxZqr4c6rS7PIvGF2ad7s,16666
|
|
20
20
|
pygeodesy/ellipsoidalKarney.py,sha256=qvJa8kZ4SgaRR2UbjtkcRxw_CRbwhXoUT4Dn_6DJ6Ag,18721
|
|
@@ -23,13 +23,13 @@ pygeodesy/ellipsoidalVincenty.py,sha256=hSQ7s6QGDJSsrZvP7KwM1Q4wJz0YjyFjODF6XPGZ
|
|
|
23
23
|
pygeodesy/ellipsoids.py,sha256=i7piclEb17hYt5wqL7Q0p5qLuRVvz3yonUSUcvmiozc,108005
|
|
24
24
|
pygeodesy/elliptic.py,sha256=M30EjB1Il_5Y8E94rN5hz4zPhYBQNoCo5Lj0TvCkiRE,45010
|
|
25
25
|
pygeodesy/epsg.py,sha256=Vq_M1g7Z0x5Noqsmt6OCQkPdYJj4jpWObtixL5pAjDA,8220
|
|
26
|
-
pygeodesy/errors.py,sha256=
|
|
26
|
+
pygeodesy/errors.py,sha256=w7aUnWFFWavu1TiMyAuxA2bAHYOZltzYqauurU8pmLY,31907
|
|
27
27
|
pygeodesy/etm.py,sha256=G6dtN1LQAoft5mcUoxVgxHPnl9s8NBsXl-IlS8WP7jo,45328
|
|
28
|
-
pygeodesy/fmath.py,sha256=
|
|
29
|
-
pygeodesy/formy.py,sha256=
|
|
28
|
+
pygeodesy/fmath.py,sha256=44yyf6shurGxFxFIj_huTk0cnRaMYYEgouFNdPrmZI0,35427
|
|
29
|
+
pygeodesy/formy.py,sha256=FvbkYhJ-iIOFR-IOImwm0I_dgXM9CfnWrJK_IvBX0SU,75082
|
|
30
30
|
pygeodesy/frechet.py,sha256=F6TYbOEYSOFcll6nvp4GhqafUWXh1umAKb1QaMYQtuM,34372
|
|
31
|
-
pygeodesy/fstats.py,sha256=
|
|
32
|
-
pygeodesy/fsums.py,sha256=
|
|
31
|
+
pygeodesy/fstats.py,sha256=r-RKXOwq2vcwEVrscKyMz0jgeyUFPD4izReKuNbxwoE,28548
|
|
32
|
+
pygeodesy/fsums.py,sha256=GgHfZMCexk_q85m0kH4jhkeMnHnoPQ7X334Jzj3t8QM,101835
|
|
33
33
|
pygeodesy/gars.py,sha256=KRlyZUv1euEl7ZkDYSZG913GAfFMRG2m2hp37ObYY_Y,11829
|
|
34
34
|
pygeodesy/geodesici.py,sha256=I9e7saiO5lRodOXJk5DSQxladVcGfT0FR6KJSJVCw7Y,75015
|
|
35
35
|
pygeodesy/geodesicw.py,sha256=oEs96Epw839BH3rVpxVdpXuQRBudbOftUsSBUid8fcc,28710
|
|
@@ -61,7 +61,7 @@ pygeodesy/solveBase.py,sha256=oI_-FFjSPI1_yQ598hF6HFKUa4tLsAfbnWtKoQ-TJgE,19206
|
|
|
61
61
|
pygeodesy/sphericalBase.py,sha256=bDVuArfePzqcothiTTkyisUGrMDTallXKROjihotcn8,32239
|
|
62
62
|
pygeodesy/sphericalNvector.py,sha256=Ip0jPv-MXBoHf3f-uXitGqiMz2xynDtE15OSJEl268Q,56913
|
|
63
63
|
pygeodesy/sphericalTrigonometry.py,sha256=cfXuJaJJ6jrJZxQ5anFHhz3ZbgkAB7aiMfuyMtJXqsE,64064
|
|
64
|
-
pygeodesy/streprs.py,sha256=
|
|
64
|
+
pygeodesy/streprs.py,sha256=4aME8X-_9SS4VESootFOoK96aHjpwq3cKNTZ5u0q_nI,23342
|
|
65
65
|
pygeodesy/trf.py,sha256=CRFHmu0lFNtc41fddXavEkHmgnTFWEqR4RTFodcFKsw,119022
|
|
66
66
|
pygeodesy/triaxials.py,sha256=a9vdXmSqUXOneL0WpLriEFwNMW9EB6MpVbKYXuw_wi8,62562
|
|
67
67
|
pygeodesy/units.py,sha256=gHN-uzsOwIYjyhtWs0th0VHNY-fOiUiZo9G1cZi0oXg,35272
|
|
@@ -112,7 +112,7 @@ pygeodesy/rhumb/aux_.py,sha256=XN0zlNwhU525NdcHko-G_Igvc7-mzXbT7ypcVIt5ADw,16048
|
|
|
112
112
|
pygeodesy/rhumb/bases.py,sha256=awpP60K6EOzS753oXM-h9S6paS6FwoCnco8Zt8n81jY,54162
|
|
113
113
|
pygeodesy/rhumb/ekx.py,sha256=JsmdCatWKqsffF8jCh4HDu5IKt_kHq1qUdmP1LMuofY,24044
|
|
114
114
|
pygeodesy/rhumb/solve.py,sha256=d4RujlW8B7BFAHlrwfj2Bup-uXZZTpgKWgI2JJBqUGc,24059
|
|
115
|
-
PyGeodesy-24.9.
|
|
116
|
-
PyGeodesy-24.9.
|
|
117
|
-
PyGeodesy-24.9.
|
|
118
|
-
PyGeodesy-24.9.
|
|
115
|
+
PyGeodesy-24.9.29.dist-info/METADATA,sha256=bw_d3WzsZrHR7el08s2UwYG_Irc0KKwlN3h_dGtgZDY,19888
|
|
116
|
+
PyGeodesy-24.9.29.dist-info/WHEEL,sha256=fS9sRbCBHs7VFcwJLnLXN1MZRR0_TVTxvXKzOnaSFs8,110
|
|
117
|
+
PyGeodesy-24.9.29.dist-info/top_level.txt,sha256=cEQPatCXzKZqrivpULC5V5fuy9_V_bAwaP_gUGid7pQ,10
|
|
118
|
+
PyGeodesy-24.9.29.dist-info/RECORD,,
|
pygeodesy/__init__.py
CHANGED
|
@@ -597,7 +597,7 @@ else:
|
|
|
597
597
|
|
|
598
598
|
from pygeodesy.internals import _version2, _DOT_ # PYCHOK import
|
|
599
599
|
# from pygeodesy.interns import _DOT_ # from .internals
|
|
600
|
-
__version__ = '24.09.
|
|
600
|
+
__version__ = '24.09.29'
|
|
601
601
|
# see setup.py for similar logic
|
|
602
602
|
version = _DOT_(*_version2(__version__, n=3))
|
|
603
603
|
|
pygeodesy/basics.py
CHANGED
|
@@ -19,7 +19,7 @@ del division
|
|
|
19
19
|
from pygeodesy.errors import _AttributeError, _ImportError, _NotImplementedError, \
|
|
20
20
|
_TypeError, _TypesError, _ValueError, _xAssertionError, \
|
|
21
21
|
_xkwds_get1
|
|
22
|
-
# from pygeodesy.fsums import
|
|
22
|
+
# from pygeodesy.fsums import _isFsum_2Tuple # _MODS
|
|
23
23
|
from pygeodesy.internals import _0_0, _enquote, _passarg, _version_info
|
|
24
24
|
from pygeodesy.interns import MISSING, NN, _1_, _by_, _COMMA_, _DOT_, _DEPRECATED_, \
|
|
25
25
|
_ELLIPSIS4_, _EQUAL_, _in_, _invalid_, _N_A_, _not_, \
|
|
@@ -38,7 +38,7 @@ from math import copysign as _copysign
|
|
|
38
38
|
import inspect as _inspect
|
|
39
39
|
|
|
40
40
|
__all__ = _ALL_LAZY.basics
|
|
41
|
-
__version__ = '24.09.
|
|
41
|
+
__version__ = '24.09.28'
|
|
42
42
|
|
|
43
43
|
_below_ = 'below'
|
|
44
44
|
_list_tuple_types = (list, tuple)
|
|
@@ -120,7 +120,7 @@ def _args_kwds_count2(func, exelf=True):
|
|
|
120
120
|
@kwarg exelf: If C{True}, exclude C{self} in the C{args}
|
|
121
121
|
of a method (C{bool}).
|
|
122
122
|
'''
|
|
123
|
-
try:
|
|
123
|
+
try: # PYCHOK no cover
|
|
124
124
|
a = k = 0
|
|
125
125
|
for _, p in _inspect.signature(func).parameters.items():
|
|
126
126
|
if p.kind is p.POSITIONAL_OR_KEYWORD:
|
|
@@ -151,7 +151,7 @@ def _args_kwds_names(func, splast=False):
|
|
|
151
151
|
args_kwds = _inspect.signature(func).parameters.keys()
|
|
152
152
|
except AttributeError: # .signature new Python 3+
|
|
153
153
|
args_kwds = _inspect.getargspec(func).args
|
|
154
|
-
if splast and args_kwds:
|
|
154
|
+
if splast and args_kwds: # PYCHOK no cover
|
|
155
155
|
args_kwds = list(args_kwds)
|
|
156
156
|
t = args_kwds[-1:]
|
|
157
157
|
if t:
|
|
@@ -469,7 +469,7 @@ def isscalar(obj, both=False):
|
|
|
469
469
|
'''
|
|
470
470
|
if isinstance(obj, _Scalars):
|
|
471
471
|
return not isbool(obj) # exclude bool
|
|
472
|
-
elif both and _MODS.fsums.
|
|
472
|
+
elif both and _MODS.fsums._isFsum_2Tuple(obj):
|
|
473
473
|
return bool(obj.residual == 0)
|
|
474
474
|
return False
|
|
475
475
|
|
pygeodesy/booleans.py
CHANGED
|
@@ -43,7 +43,7 @@ from pygeodesy.utily import fabs, _unrollon, _Wrap
|
|
|
43
43
|
# from math import fabs # from .utily
|
|
44
44
|
|
|
45
45
|
__all__ = _ALL_LAZY.booleans
|
|
46
|
-
__version__ = '24.09.
|
|
46
|
+
__version__ = '24.09.28'
|
|
47
47
|
|
|
48
48
|
_0_EPS = EPS # near-zero, positive
|
|
49
49
|
_EPS_0 = -EPS # near-zero, negative
|
|
@@ -1614,9 +1614,8 @@ class _EdgeGH(object):
|
|
|
1614
1614
|
return a, fabs(d)
|
|
1615
1615
|
|
|
1616
1616
|
def _Error(self, n, *args, **kwds): # PYCHOK no cover
|
|
1617
|
-
t =
|
|
1618
|
-
|
|
1619
|
-
t = unstr(t, *args, **kwds)
|
|
1617
|
+
t = _DOT_(unstr(_EdgeGH, self._s1, self._s2),
|
|
1618
|
+
unstr(_EdgeGH._intersect4, *args, **kwds))
|
|
1620
1619
|
return ClipError(_case_, n, txt=t)
|
|
1621
1620
|
|
|
1622
1621
|
@Property_RO
|
pygeodesy/constants.py
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
|
|
1
2
|
# -*- coding: utf-8 -*-
|
|
2
3
|
|
|
3
4
|
u'''Single-instance C{float} and C{int} constants across C{pygeodesy} modules and
|
|
@@ -11,6 +12,7 @@ from __future__ import division as _; del _ # PYCHOK semicolon
|
|
|
11
12
|
|
|
12
13
|
from pygeodesy.basics import _copysign, isbool, iscomplex, isint, _0_0
|
|
13
14
|
from pygeodesy.errors import _xError, _xError2, _xkwds_get1, _xkwds_item2
|
|
15
|
+
# from pygeodesy.fsums import _isFsum_2Tuple # _MODS
|
|
14
16
|
# from pygeodesy.internals import _0_0 # from .basics
|
|
15
17
|
from pygeodesy.interns import _INF_, _NAN_, _UNDER_
|
|
16
18
|
from pygeodesy.lazily import _ALL_MODS as _MODS, _ALL_LAZY
|
|
@@ -24,7 +26,7 @@ except ImportError: # Python 2-
|
|
|
24
26
|
_inf, _nan = float(_INF_), float(_NAN_)
|
|
25
27
|
|
|
26
28
|
__all__ = _ALL_LAZY.constants
|
|
27
|
-
__version__ = '24.09.
|
|
29
|
+
__version__ = '24.09.28'
|
|
28
30
|
|
|
29
31
|
|
|
30
32
|
def _copysign_0_0(y):
|
|
@@ -355,7 +357,7 @@ def isfinite(obj):
|
|
|
355
357
|
except Exception as x:
|
|
356
358
|
if iscomplex(obj): # _isfinite(complex) thows TypeError
|
|
357
359
|
return _iscfinite(obj)
|
|
358
|
-
if _MODS.fsums.
|
|
360
|
+
if _MODS.fsums._isFsum_2Tuple(obj): # OverflowError
|
|
359
361
|
return obj.is_finite()
|
|
360
362
|
raise _xError(x, Fmt.PAREN(isfinite.__name__, obj))
|
|
361
363
|
|
pygeodesy/ellipsoidalBaseDI.py
CHANGED
|
@@ -34,7 +34,7 @@ from pygeodesy.utily import m2km, unroll180, _unrollon, _unrollon3, \
|
|
|
34
34
|
from math import degrees, radians
|
|
35
35
|
|
|
36
36
|
__all__ = _ALL_LAZY.ellipsoidalBaseDI
|
|
37
|
-
__version__ = '24.
|
|
37
|
+
__version__ = '24.09.26'
|
|
38
38
|
|
|
39
39
|
_polar__ = 'polar?'
|
|
40
40
|
_B2END = _1_5 # _intersect3 bearing to pseudo-end point factor
|
|
@@ -365,7 +365,7 @@ class LatLonEllipsoidalBaseDI(LatLonEllipsoidalBase):
|
|
|
365
365
|
c3 = _d3(c, wrap=wrap) # XXX wrap=False?
|
|
366
366
|
|
|
367
367
|
except (TypeError, ValueError) as x:
|
|
368
|
-
raise _xError(x, Fmt.
|
|
368
|
+
raise _xError(x, Fmt.INDEX(points=0), p1, this=self, tol=tol,
|
|
369
369
|
closed=closed, height=height, wrap=wrap)
|
|
370
370
|
|
|
371
371
|
# get the azimuthal equidistant projection, once
|
|
@@ -391,8 +391,8 @@ class LatLonEllipsoidalBaseDI(LatLonEllipsoidalBase):
|
|
|
391
391
|
p1, i = p2, j
|
|
392
392
|
|
|
393
393
|
except (TypeError, ValueError) as x:
|
|
394
|
-
raise _xError(x, Fmt.
|
|
395
|
-
Fmt.
|
|
394
|
+
raise _xError(x, Fmt.INDEX(points=i), p1,
|
|
395
|
+
Fmt.INDEX(points=j), p2, this=self, tol=tol,
|
|
396
396
|
closed=closed, height=height, wrap=wrap)
|
|
397
397
|
|
|
398
398
|
f, j = _fi_j2(f, len(Ps)) # like .vector3d.nearestOn6
|
pygeodesy/errors.py
CHANGED
|
@@ -27,7 +27,7 @@ from pygeodesy.lazily import _ALL_LAZY, _ALL_MODS as _MODS, _getenv, _PYTHON_X_D
|
|
|
27
27
|
from copy import copy as _copy
|
|
28
28
|
|
|
29
29
|
__all__ = _ALL_LAZY.errors # _ALL_DOCS('_InvalidError', '_IsnotError') _under
|
|
30
|
-
__version__ = '24.09.
|
|
30
|
+
__version__ = '24.09.26'
|
|
31
31
|
|
|
32
32
|
_argument_ = 'argument'
|
|
33
33
|
_box_ = 'box'
|
|
@@ -892,6 +892,14 @@ def _Xorder(_Coeffs, Error, **Xorder): # in .auxLat, .ktm, .rhumb.bases, .rhumb
|
|
|
892
892
|
raise Error(X, m, txt_not_=_or(*t))
|
|
893
893
|
|
|
894
894
|
|
|
895
|
+
def _xsError(X, xs, i, x, *n, **kwds): # in .fmath, ._fstats, .fsums
|
|
896
|
+
'''(INTERNAL) Error for C{xs} or C{x}, item C{xs[i]}.
|
|
897
|
+
'''
|
|
898
|
+
return ((_xError(X, n[0], xs, **kwds) if n else
|
|
899
|
+
_xError(X, xs=xs, **kwds)) if x is xs else
|
|
900
|
+
_xError(X, _streprs.Fmt.INDEX(xs=i), x, **kwds))
|
|
901
|
+
|
|
902
|
+
|
|
895
903
|
def _xStrError(*Refs, **name_value_Error): # in .gars, .geohash, .wgrs
|
|
896
904
|
'''(INTERNAL) Create a C{TypeError} for C{Garef}, C{Geohash}, C{Wgrs}.
|
|
897
905
|
'''
|
pygeodesy/fmath.py
CHANGED
|
@@ -12,8 +12,8 @@ from pygeodesy.constants import EPS0, EPS02, EPS1, NAN, PI, PI_2, PI_4, \
|
|
|
12
12
|
_0_0, _0_125, _1_6th, _0_25, _1_3rd, _0_5, _1_0, \
|
|
13
13
|
_N_1_0, _1_5, _copysign_0_0, isfinite, remainder
|
|
14
14
|
from pygeodesy.errors import _IsnotError, LenError, _TypeError, _ValueError, \
|
|
15
|
-
_xError, _xkwds_get1, _xkwds_pop2
|
|
16
|
-
from pygeodesy.fsums import _2float, Fsum, fsum, fsum1_,
|
|
15
|
+
_xError, _xkwds_get1, _xkwds_pop2, _xsError
|
|
16
|
+
from pygeodesy.fsums import _2float, Fsum, fsum, fsum1_, _isFsum_2Tuple, \
|
|
17
17
|
_1primed, _Psum_, Fmt, unstr
|
|
18
18
|
from pygeodesy.interns import MISSING, _negative_, _not_scalar_
|
|
19
19
|
from pygeodesy.lazily import _ALL_LAZY, _sys_version_info2
|
|
@@ -24,7 +24,7 @@ from math import fabs, sqrt # pow
|
|
|
24
24
|
import operator as _operator # in .datums, .trf, .utm
|
|
25
25
|
|
|
26
26
|
__all__ = _ALL_LAZY.fmath
|
|
27
|
-
__version__ = '24.09.
|
|
27
|
+
__version__ = '24.09.29'
|
|
28
28
|
|
|
29
29
|
# sqrt(2) - 1 <https://WikiPedia.org/wiki/Square_root_of_2>
|
|
30
30
|
_0_4142 = 0.41421356237309504880 # ... ~ 3730904090310553 / 9007199254740992
|
|
@@ -262,7 +262,7 @@ def cbrt(x):
|
|
|
262
262
|
|
|
263
263
|
@see: Functions L{cbrt2} and L{sqrt3}.
|
|
264
264
|
'''
|
|
265
|
-
if
|
|
265
|
+
if _isFsum_2Tuple(x):
|
|
266
266
|
r = abs(x).fpow(_1_3rd)
|
|
267
267
|
if x.signOf() < 0:
|
|
268
268
|
r = -r
|
|
@@ -280,7 +280,7 @@ def cbrt2(x): # PYCHOK attr
|
|
|
280
280
|
|
|
281
281
|
@see: Functions L{cbrt} and L{sqrt3}.
|
|
282
282
|
'''
|
|
283
|
-
return abs(x).fpow(_2_3rd) if
|
|
283
|
+
return abs(x).fpow(_2_3rd) if _isFsum_2Tuple(x) else _cbrt(x**2)
|
|
284
284
|
|
|
285
285
|
|
|
286
286
|
def euclid(x, y):
|
|
@@ -545,20 +545,20 @@ def fidw(xs, ds, beta=2):
|
|
|
545
545
|
return x
|
|
546
546
|
|
|
547
547
|
|
|
548
|
-
def fma(x, y, z, **
|
|
549
|
-
'''Fused-multiply-add, using C{math.fma(x, y, z)}
|
|
548
|
+
def fma(x, y, z, **nonfinites):
|
|
549
|
+
'''Fused-multiply-add, using C{math.fma(x, y, z)} in Python 3.13+
|
|
550
550
|
or an equivalent implementation.
|
|
551
551
|
|
|
552
552
|
@arg x: Multiplicand (C{scalar}, an L{Fsum} or L{Fsum2Tuple}).
|
|
553
553
|
@arg y: Multiplier (C{scalar}, an L{Fsum} or L{Fsum2Tuple}).
|
|
554
554
|
@arg z: Addend (C{scalar}, an L{Fsum} or L{Fsum2Tuple}).
|
|
555
|
-
@kwarg
|
|
556
|
-
|
|
557
|
-
|
|
555
|
+
@kwarg nonfinites: Use C{B{nonfinites}=True} or C{=False}, to
|
|
556
|
+
override default L{nonfiniterrors} (C{bool}),
|
|
557
|
+
see L{Fsum<Fsum.__init__>},
|
|
558
558
|
|
|
559
559
|
@return: C{(x * y) + z} (L{Fsum} or C{float}).
|
|
560
560
|
'''
|
|
561
|
-
return _Psum_(x).fma(y, z,
|
|
561
|
+
return _Psum_(x).fma(y, z, **nonfinites).as_iscalar
|
|
562
562
|
|
|
563
563
|
|
|
564
564
|
def fmean(xs):
|
|
@@ -586,20 +586,20 @@ def fmean_(*xs):
|
|
|
586
586
|
return fmean(xs)
|
|
587
587
|
|
|
588
588
|
|
|
589
|
-
def f2mul_(x, *ys, **
|
|
589
|
+
def f2mul_(x, *ys, **nonfinites):
|
|
590
590
|
'''Cascaded, accurate multiplication C{B{x} * B{y} * B{y} ...} for all B{C{ys}}.
|
|
591
591
|
|
|
592
592
|
@arg x: Multiplicand (C{scalar}, an L{Fsum} or L{Fsum2Tuple}).
|
|
593
593
|
@arg ys: Multipliers (each C{scalar}, an L{Fsum} or L{Fsum2Tuple}), all
|
|
594
594
|
positional.
|
|
595
|
-
@kwarg
|
|
596
|
-
|
|
595
|
+
@kwarg nonfinites: Use C{B{nonfinites}=True} or C{=False}, to override default
|
|
596
|
+
L{nonfiniterrors} (C{bool}), see L{Fsum<Fsum.__init__>}.
|
|
597
597
|
|
|
598
598
|
@return: The cascaded I{TwoProduct} (L{Fsum}, C{float} or C{int}).
|
|
599
599
|
|
|
600
600
|
@see: U{Equations 2.3<https://www.TUHH.De/ti3/paper/rump/OzOgRuOi06.pdf>}
|
|
601
601
|
'''
|
|
602
|
-
return _Psum_(x).f2mul_(*ys, **
|
|
602
|
+
return _Psum_(x).f2mul_(*ys, **nonfinites).as_iscalar
|
|
603
603
|
|
|
604
604
|
|
|
605
605
|
def fpolynomial(x, *cs, **over):
|
|
@@ -636,7 +636,7 @@ def fpowers(x, n, alts=0):
|
|
|
636
636
|
elif n < 1:
|
|
637
637
|
raise _ValueError(n=n)
|
|
638
638
|
|
|
639
|
-
p = x if isscalar(x) or
|
|
639
|
+
p = x if isscalar(x) or _isFsum_2Tuple(x) else _2float(x=x)
|
|
640
640
|
ps = tuple(_powers(p, n))
|
|
641
641
|
|
|
642
642
|
if alts > 0: # x**2, x**4, ...
|
|
@@ -839,7 +839,7 @@ def hypot1(x):
|
|
|
839
839
|
|
|
840
840
|
@return: Norm (C{float}).
|
|
841
841
|
'''
|
|
842
|
-
if
|
|
842
|
+
if _isFsum_2Tuple(x):
|
|
843
843
|
h = float(Fhypot(_1_0, x)) if x else _1_0
|
|
844
844
|
else:
|
|
845
845
|
h = hypot(_1_0, x) if x else _1_0
|
|
@@ -937,13 +937,14 @@ def norm_(*xs):
|
|
|
937
937
|
or zero norm.
|
|
938
938
|
'''
|
|
939
939
|
try:
|
|
940
|
-
i =
|
|
940
|
+
i = h = None
|
|
941
|
+
x = xs
|
|
941
942
|
h = hypot_(*xs)
|
|
942
943
|
_h = (_1_0 / h) if h else _0_0
|
|
943
944
|
for i, x in enumerate(xs):
|
|
944
945
|
yield x * _h
|
|
945
946
|
except Exception as X:
|
|
946
|
-
raise
|
|
947
|
+
raise _xsError(X, xs, i, x, h=h)
|
|
947
948
|
|
|
948
949
|
|
|
949
950
|
def _powers(x, n):
|
pygeodesy/formy.py
CHANGED
|
@@ -6,6 +6,7 @@ u'''Formulary of basic geodesy functions and approximations.
|
|
|
6
6
|
# make sure int/int division yields float quotient, see .basics
|
|
7
7
|
from __future__ import division as _; del _ # PYCHOK semicolon
|
|
8
8
|
|
|
9
|
+
# from pygeodesy.basics import W_args_kwds_count2
|
|
9
10
|
# from pygeodesy.cartesianBase import CartesianBase # _MODS
|
|
10
11
|
from pygeodesy.constants import EPS, EPS0, EPS1, PI, PI2, PI3, PI_2, R_M, \
|
|
11
12
|
_0_0s, float0_, isnon0, remainder, _umod_PI2, \
|
|
@@ -42,7 +43,7 @@ from contextlib import contextmanager
|
|
|
42
43
|
from math import asin, atan, atan2, cos, degrees, fabs, radians, sin, sqrt # pow
|
|
43
44
|
|
|
44
45
|
__all__ = _ALL_LAZY.formy
|
|
45
|
-
__version__ = '24.
|
|
46
|
+
__version__ = '24.09.27'
|
|
46
47
|
|
|
47
48
|
_RADIANS2 = (PI / _180_0)**2 # degrees- to radians-squared
|
|
48
49
|
_ratio_ = 'ratio'
|
pygeodesy/fstats.py
CHANGED
|
@@ -10,10 +10,10 @@ from __future__ import division as _; del _ # PYCHOK semicolon
|
|
|
10
10
|
from pygeodesy.basics import isscalar, isodd, _xinstanceof, \
|
|
11
11
|
_xiterable, _xsubclassof, _zip
|
|
12
12
|
from pygeodesy.constants import _0_0, _1_0, _2_0, _3_0, _4_0, _6_0
|
|
13
|
-
from pygeodesy.errors import _ValueError, _xError, _xkwds_item2
|
|
13
|
+
from pygeodesy.errors import _ValueError, _xError, _xkwds_item2, \
|
|
14
|
+
_xsError
|
|
14
15
|
from pygeodesy.fmath import Fsqrt, Fmt
|
|
15
|
-
from pygeodesy.fsums import _2finite, Fsum, _iadd_op_,
|
|
16
|
-
_isFsumTuple, _xsError
|
|
16
|
+
from pygeodesy.fsums import _2finite, Fsum, _iadd_op_, _isFsum_2Tuple
|
|
17
17
|
from pygeodesy.interns import _odd_, _SPACE_
|
|
18
18
|
from pygeodesy.lazily import _ALL_DOCS, _ALL_LAZY
|
|
19
19
|
from pygeodesy.named import _name__, _Named, _NotImplemented, \
|
|
@@ -22,7 +22,7 @@ from pygeodesy.named import _name__, _Named, _NotImplemented, \
|
|
|
22
22
|
# from pygeodesy.streprs import Fmt # from .fmath
|
|
23
23
|
|
|
24
24
|
__all__ = _ALL_LAZY.fstats
|
|
25
|
-
__version__ = '24.09.
|
|
25
|
+
__version__ = '24.09.28'
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
def _2Floats(**xs):
|
|
@@ -32,7 +32,7 @@ def _2Floats(**xs):
|
|
|
32
32
|
try:
|
|
33
33
|
i, x = None, xs
|
|
34
34
|
for i, x in enumerate(_xiterable(xs)): # don't unravel Fsums
|
|
35
|
-
yield x._Fsum if
|
|
35
|
+
yield x._Fsum if _isFsum_2Tuple(x) else _2finite(x)
|
|
36
36
|
except Exception as X:
|
|
37
37
|
raise _xsError(X, xs, i, x, name)
|
|
38
38
|
|
|
@@ -186,7 +186,7 @@ class _FstatsBase(_FstatsNamed):
|
|
|
186
186
|
'''(INTERNAL) Add one or several values.
|
|
187
187
|
'''
|
|
188
188
|
try:
|
|
189
|
-
if
|
|
189
|
+
if _isFsum_2Tuple(other):
|
|
190
190
|
self.fadd_(other._Fsum)
|
|
191
191
|
elif isscalar(other):
|
|
192
192
|
self.fadd_(_2finite(other))
|