Closed f380cedric closed 3 years ago
Python 3.9.2 nvector 0.7.7
Following Example 1:
import numpy as np import nvector as nv wgs84 = nv.FrameE(name='WGS84') pointA = wgs84.GeoPoint(latitude=1, longitude=2, z=3, degrees=True) pointB = wgs84.GeoPoint(latitude=4, longitude=5, z=6, degrees=True) p_AB_N = pointA.delta_to(pointB) print(p_AB_N)
gives
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/f380cedric/.local/lib/python3.9/site-packages/nvector/objects.py", line 138, in __repr__ params = fmt.join(['{}={!r}'.format(name, dict_params[name]) File "/home/f380cedric/.local/lib/python3.9/site-packages/nvector/objects.py", line 138, in <listcomp> params = fmt.join(['{}={!r}'.format(name, dict_params[name]) File "/home/f380cedric/.local/lib/python3.9/site-packages/nvector/objects.py", line 138, in __repr__ params = fmt.join(['{}={!r}'.format(name, dict_params[name]) File "/home/f380cedric/.local/lib/python3.9/site-packages/nvector/objects.py", line 138, in <listcomp> params = fmt.join(['{}={!r}'.format(name, dict_params[name]) KeyError: 'point'
It goes like this: Pvector.__dict__["frame"] → FrameN.__dict__["point"]. FrameN._NAMES gives "point" while dict_params only contains key nvector.
Pvector.__dict__["frame"] → FrameN.__dict__["point"]
FrameN._NAMES
"point"
dict_params
nvector
Thanks for the notification. This is clearly a bug!
Closing since it is fixed in commit https://github.com/pbrod/nvector/commit/096e0b8ce7294492b27f16f8dd37585e57dd7044
Python 3.9.2 nvector 0.7.7
Following Example 1:
gives
It goes like this:
Pvector.__dict__["frame"] → FrameN.__dict__["point"]
.FrameN._NAMES
gives"point"
whiledict_params
only contains keynvector
.