-
Notifications
You must be signed in to change notification settings - Fork 8
Description
The problem is similar to https://github.com/poliastro/poliastro/issues/1632
the code:
`
from astropy import units as u
from astropy.time import Time
from hapsira.bodies import Earth, Mars, Sun
from hapsira.twobody import Orbit
from hapsira.ephem import Ephem
orb_earth = Ephem.from_body(Earth,Time("2018-09-28"))
r_2, v_2 = orb_earth.rv()
print(r_2,v_2)
and the error message:
Traceback (most recent call last):
File "d:\Allcode\python\python\1.py", line 41, in
File "d:\Allcode\python\python\1.py", line 41, in
r_2, v_2 = orb_earth.rv()
File "D:\software\programming\python\lib\site-packages\hapsira\ephem.py", line 348, in rv
r = coordinates.get_xyz(xyz_axis=1)
r_2, v_2 = orb_earth.rv()
File "D:\software\programming\python\lib\site-packages\hapsira\ephem.py", line 348, in rv
r = coordinates.get_xyz(xyz_axis=1)
File "D:\software\programming\python\lib\site-packages\astropy\coordinates\representation.py", line 1351, in get_xyz
r = coordinates.get_xyz(xyz_axis=1)
File "D:\software\programming\python\lib\site-packages\astropy\coordinates\representation.py", line 1351, in get_xyz
File "D:\software\programming\python\lib\site-packages\astropy\coordinates\representation.py", line 1351, in get_xyz
return np.stack([self._x, self._y, self._z], axis=xyz_axis)
File "<array_function internals>", line 200, in stack
File "D:\software\programming\python\lib\site-packages\astropy\units\quantity.py", line 1683, in array_function
return super().array_function(function, types, args, kwargs)
File "C:\Users\qazsedc\AppData\Roaming\Python\Python39\site-packages\numpy\core\shape_base.py", line 471, in stack
return _nx.concatenate(expanded_arrays, axis=axis, out=out,
File "<array_function internals>", line 200, in concatenate
File "D:\software\programming\python\lib\site-packages\astropy\units\quantity.py", line 1688, in array_function
args, kwargs, unit, out = function_helper(*args, **kwargs)
TypeError: concatenate() got an unexpected keyword argument 'dtype'Traceback (most recent call last):
File "d:\Allcode\python\1.py", line 41, in
File "d:\Allcode\python\1.py", line 41, in
r_2, v_2 = orb_earth.rv()
File "D:\software\programming\python\lib\site-packages\hapsira\ephem.py", line 348, in rv
r = coordinates.get_xyz(xyz_axis=1)
r_2, v_2 = orb_earth.rv()
File "D:\software\programming\python\lib\site-packages\hapsira\ephem.py", line 348, in rv
r = coordinates.get_xyz(xyz_axis=1)
File "D:\software\programming\python\lib\site-packages\astropy\coordinates\representation.py", line 1351, in get_xyz
r = coordinates.get_xyz(xyz_axis=1)
File "D:\software\programming\python\lib\site-packages\astropy\coordinates\representation.py", line 1351, in get_xyz
File "D:\software\programming\python\lib\site-packages\astropy\coordinates\representation.py", line 1351, in get_xyz
return np.stack([self._x, self._y, self._z], axis=xyz_axis)
File "<array_function internals>", line 200, in stack
File "D:\software\programming\python\lib\site-packages\astropy\units\quantity.py", line 1683, in array_function
return super().array_function(function, types, args, kwargs)
File "C:\Users\qazsedc\AppData\Roaming\Python\Python39\site-packages\numpy\core\shape_base.py", line 471, in stack
return _nx.concatenate(expanded_arrays, axis=axis, out=out,
File "<array_function internals>", line 200, in concatenate
File "D:\software\programming\python\lib\site-packages\astropy\units\quantity.py", line 1688, in array_function
args, kwargs, unit, out = function_helper(*args, **kwargs)
TypeError: concatenate() got an unexpected keyword argument 'dtype'
`