From 2dce87954029c989dd55cff002eabaeb3a743301 Mon Sep 17 00:00:00 2001 From: Nikhil Mahajan Date: Tue, 19 May 2020 10:00:55 -0400 Subject: [PATCH 1/2] Fix Overflow Error on systems where C long is int32 --- scintillometry/phases/predictor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scintillometry/phases/predictor.py b/scintillometry/phases/predictor.py index 1a68c33c..ad276dc2 100644 --- a/scintillometry/phases/predictor.py +++ b/scintillometry/phases/predictor.py @@ -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): From 19215765a48f40dd583a62eab20c5f01a2b6473e Mon Sep 17 00:00:00 2001 From: Nikhil Mahajan Date: Tue, 19 May 2020 10:07:56 -0400 Subject: [PATCH 2/2] Fix "ambiguous variable name". --- scintillometry/tests/test_predictor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scintillometry/tests/test_predictor.py b/scintillometry/tests/test_predictor.py index c2f6cb6e..225a2b8c 100644 --- a/scintillometry/tests/test_predictor.py +++ b/scintillometry/tests/test_predictor.py @@ -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'))