Skip to content

Commit

Permalink
Merge pull request #166 from theXYZT/master
Browse files Browse the repository at this point in the history
Fix Overflow Error on systems where C long is int32
  • Loading branch information
mhvk authored May 19, 2020
2 parents d5a83c7 + 1921576 commit 719eecf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion scintillometry/phases/predictor.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ def searchclosest(self, mjd):
def int_frac(s):
mjd_int, _, frac = s.strip().partition('.')
return np.array((int('0' + mjd_int), float('0.' + frac)),
dtype=[('int', int), ('frac', float)])
dtype=[('int', np.int64), ('frac', np.float64)])


def change_type(cls, **kwargs):
Expand Down
4 changes: 2 additions & 2 deletions scintillometry/tests/test_predictor.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ def setup(self):

def test_polyco_reading(self):
assert len(self.polyco) == 4
for l in self.polyco:
assert len(l['coeff']) == l['ncoeff']
for entry in self.polyco:
assert len(entry['coeff']) == entry['ncoeff']

def test_polyco_writing_roundtrip_tempo1(self, tmpdir):
name = str(tmpdir.join('polyco.dat'))
Expand Down

0 comments on commit 719eecf

Please sign in to comment.