We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm getting an Exception thrown when I try to use timelib.calendar_tuple with an array.
timelib.calendar_tuple
>>> import numpy as np >>> from skyfield import timelib >>> jd_array = 2440587.5 + np.arange(10.0) >>> years, months, days, hours, minutes, seconds = timelib.calendar_tuple(jd_array) Traceback (most recent call last): File "<stdin>", line 2, in <module> File "/bg01/homescinet/k/krs/jrs65/sfdev/python-skyfield/skyfield/timelib.py", line 575, in calendar_tuple whole = whole.astype(whole) TypeError: data type not understood
I think the issue is that the offending line (skyfield/timelib.py:575) has a slight typo and that it should be changed from:
whole = whole.astype(whole)
to
whole = whole.astype(int)
Making that change allows it to work correctly on array inputs, and doesn't cause any regressions in the unit tests.
I'll try and put together a PR for it later on today.
The text was updated successfully, but these errors were encountered:
A quick comment...
This issue crops up when calling Time.tt_calendar() or Time.tai_calendar(), e.g.
Time.tt_calendar()
Time.tai_calendar()
tv = ts.utc(range(2000, 2010)) tv.tt_calendar() # Fails
Sorry, something went wrong.
Fixed issue skyfielders#102.
82225b6
Also added _to_array to protect routine against failure when called with Python scalar.
56a5437
Fixed in 10d7a89.
brandon-rhodes
No branches or pull requests
Uh oh!
There was an error while loading. Please reload this page.
I'm getting an Exception thrown when I try to use
timelib.calendar_tuple
with an array.I think the issue is that the offending line (skyfield/timelib.py:575) has a slight typo and that it should be changed from:
to
Making that change allows it to work correctly on array inputs, and doesn't cause any regressions in the unit tests.
I'll try and put together a PR for it later on today.
The text was updated successfully, but these errors were encountered: