pygeodesy 24.9.24__py2.py3-none-any.whl → 24.10.10__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/internals.py CHANGED
@@ -1,3 +1,4 @@
1
+
1
2
  # -*- coding: utf-8 -*-
2
3
 
3
4
  u'''Mostly INTERNAL functions, except L{machine}, L{print_} and L{printf}.
pygeodesy/streprs.py CHANGED
@@ -22,7 +22,7 @@ from pygeodesy.lazily import _ALL_LAZY, _ALL_MODS as _MODS, _dunder_nameof
22
22
  from math import fabs, log10 as _log10
23
23
 
24
24
  __all__ = _ALL_LAZY.streprs
25
- __version__ = '24.08.13'
25
+ __version__ = '24.10.04'
26
26
 
27
27
  _at_ = 'at' # PYCHOK used!
28
28
  _EN_PREC = 6 # max MGRS/OSGR precision, 1 micrometer
@@ -535,26 +535,36 @@ def strs(objs, prec=6, fmt=Fmt.F, ints=False):
535
535
  return tuple(_streprs(prec, objs, fmt, ints, False, str)) if objs else ()
536
536
 
537
537
 
538
- def unstr(where, *args, **kwds):
538
+ def unstr(where, *args, **kwds_):
539
539
  '''Return the string representation of an invokation.
540
540
 
541
541
  @arg where: Class, function, method (C{type}) or name (C{str}).
542
542
  @arg args: Optional positional arguments.
543
- @kwarg kwds: Optional keyword arguments, except C{B{_fmt}=Fmt.g}
544
- and C{B{_ELLIPSIS}=False}.
543
+ @kwarg kwds_: Optional keyword arguments, except C{B{_Cdot}=None},
544
+ C{B{_ELLIPSIS}=False} and C{B{_fmt}=Fmt.g}.
545
545
 
546
546
  @return: Representation (C{str}).
547
547
  '''
548
- def _e_g_kwds3(_ELLIPSIS=False, _fmt=Fmt.g, **kwds):
549
- return _ELLIPSIS, _fmt, kwds
548
+ def _C_e_g_kwds3(_Cdot=None, _ELLIPSIS=0, _fmt=Fmt.g, **kwds):
549
+ return _Cdot, _ELLIPSIS, _fmt, kwds
550
550
 
551
- e, g, kwds = _e_g_kwds3(**kwds)
552
- t = reprs(args, fmt=g) if args else ()
553
- if e:
551
+ C, e, g, kwds = _C_e_g_kwds3(**kwds_)
552
+ if e and len(args) > (e + 1):
553
+ t = reprs(args[:e], fmt=g)
554
554
  t += _ELLIPSIS_,
555
+ t += reprs(args[-1:], fmt=g)
556
+ else:
557
+ t = reprs(args, fmt=g) if args else ()
555
558
  if kwds:
556
559
  t += pairs(itemsorted(kwds), fmt=g)
557
560
  n = where if isstr(where) else _dunder_nameof(where) # _NN_
561
+ if C and hasattr(C, n):
562
+ try: # bound method of class C?
563
+ where = where.__func__
564
+ except AttributeError:
565
+ pass # method of C?
566
+ if getattr(C, n, None) is where:
567
+ n = _DOT_(_dunder_nameof(C), n)
558
568
  return Fmt.PAREN(n, _COMMASPACE_.join(t))
559
569
 
560
570
 
pygeodesy/vector3d.py CHANGED
@@ -11,9 +11,9 @@ from pygeodesy.constants import EPS, EPS0, EPS1, EPS4, INT0, isnear0, \
11
11
  _0_0, _1_0
12
12
  from pygeodesy.errors import IntersectionError, _ValueError, VectorError, \
13
13
  _xattr, _xError, _xkwds, _xkwds_get, _xkwds_item2
14
- from pygeodesy.fmath import euclid, fabs, fdot, hypot, sqrt, fsum1_
15
- # from pygeodesy.fsums import fsum1_ # from .fmath
16
- # from pygeodesy.formy import _radical2 # in _intersects2 below
14
+ from pygeodesy.fmath import euclid, fabs, fdot, hypot, sqrt
15
+ # from pygeodesy.fsums import fsum1_ # from _MODS
16
+ # from pygeodesy.formy import _radical2 # _MODS
17
17
  from pygeodesy.interns import _COMMA_, _concentric_, _intersection_, \
18
18
  _near_, _negative_, _no_, _too_
19
19
  from pygeodesy.iters import PointsIter, Fmt
@@ -31,7 +31,7 @@ from pygeodesy.vector3dBase import Vector3dBase
31
31
  # from math import fabs, sqrt # from .fmath
32
32
 
33
33
  __all__ = _ALL_LAZY.vector3d
34
- __version__ = '24.08.18'
34
+ __version__ = '24.10.01'
35
35
 
36
36
  _vector2d = _MODS.into(vector2d=__name__)
37
37
 
@@ -595,7 +595,7 @@ def _intersects2(center1, r1, center2, r2, sphere=True, too_d=None, # in Cartes
595
595
  if d < max(r2 - r1, EPS):
596
596
  raise IntersectionError(_near_(_concentric_)) # XXX ConcentricError?
597
597
 
598
- o = fsum1_(-d, r1, r2) # overlap == -(d - (r1 + r2))
598
+ o = _MODS.fsums.fsum1_(-d, r1, r2) # overlap == -(d - (r1 + r2))
599
599
  # compute intersections with c1 at (0, 0) and c2 at (d, 0), like
600
600
  # <https://MathWorld.Wolfram.com/Circle-CircleIntersection.html>
601
601
  if o > EPS: # overlapping, r1, r2 == R, r