Skip to content

Commit

Permalink
Fixed dafgda indexing error (#303)
Browse files Browse the repository at this point in the history
* Fixed dafgda indexing error
* details at #302
  • Loading branch information
jessemapel authored and AndrewAnnex committed Sep 22, 2019
1 parent e97006e commit 492e0af
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion spiceypy/spiceypy.py
Expand Up @@ -1896,7 +1896,7 @@ def dafgda(handle, begin, end):
:rtype: Array of floats
"""
handle = ctypes.c_int(handle)
data = stypes.emptyDoubleVector(abs(end - begin))
data = stypes.emptyDoubleVector(abs(end - begin) + 1)
begin = ctypes.c_int(begin)
end = ctypes.c_int(end)
libspice.dafgda_c(handle, begin, end, data)
Expand Down
2 changes: 1 addition & 1 deletion spiceypy/tests/test_wrapper.py
Expand Up @@ -1007,7 +1007,7 @@ def test_dafgda():
# not a very good test...
spice.kclear()
handle = spice.dafopr(CoreKernels.spk)
elements = spice.dafgda(handle, 20, 21)
elements = spice.dafgda(handle, 20, 20)
assert elements == [0.0]
spice.dafcls(handle)
spice.kclear()
Expand Down

0 comments on commit 492e0af

Please sign in to comment.