orbital icon indicating copy to clipboard operation
orbital copied to clipboard

Encountering TypeError: object of type <class 'float'> cannot be safely interpreted as an integer

Open OrbitalMechanic opened this issue 4 years ago • 2 comments

I attempted to run the example on the GitHub page. See the attached file.

The results I get are

Last login: Fri Jan 10 23:56:44 on ttys001 users-MacBook-Pro:~ user$ python untitled-text-2.py Traceback (most recent call last): File "/Users/user/anaconda3/lib/python3.7/site-packages/numpy/core/function_base.py", line 117, in linspace num = operator.index(num) TypeError: 'float' object cannot be interpreted as an integer

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "untitled-text-2.py", line 11, in plot(orbit, title='Maneuver 1', maneuver=man) File "/Users/user/anaconda3/lib/python3.7/site-packages/orbital/plotting.py", line 37, in plot2d plotter.plot(orbit, title=title, maneuver=maneuver) File "/Users/user/anaconda3/lib/python3.7/site-packages/orbital/plotting.py", line 78, in plot self._plot_orbit(orbit, label='Initial orbit') File "/Users/user/anaconda3/lib/python3.7/site-packages/orbital/plotting.py", line 136, in _plot_orbit f = np.linspace(f1, f2, num_points) File "<array_function internals>", line 6, in linspace File "/Users/user/anaconda3/lib/python3.7/site-packages/numpy/core/function_base.py", line 121, in linspace .format(type(num))) TypeError: object of type <class 'float'> cannot be safely interpreted as an integer. users-MacBook-Pro:~ user$

Please advise.

Sam Dupree. untitled-text-2.py.txt

OrbitalMechanic avatar Jan 11 '20 05:01 OrbitalMechanic