diff --git a/pysynphot/obsbandpass.py b/pysynphot/obsbandpass.py index 55ed199f..4fa870de 100644 --- a/pysynphot/obsbandpass.py +++ b/pysynphot/obsbandpass.py @@ -505,11 +505,11 @@ def wave_range(bins, cenwave, npix, round='round'): # translate ends to wavelength if round is None: # translate ends directly to wavelength without regard to bin edges - f, i = frac1, int1 + f, i = frac1, int(int1) wave1 = bins[i] + frac1 * (bins[i+1] - bins[i]) - f, i = frac2, int2 + f, i = frac2, int(int2) wave2 = bins[i] + frac2 * (bins[i+1] - bins[i]) diff --git a/pysynphot/refs.py b/pysynphot/refs.py index 82dab444..2fc82aff 100644 --- a/pysynphot/refs.py +++ b/pysynphot/refs.py @@ -43,7 +43,7 @@ PRIMARY_AREA = 45238.93416 # cm^2 - default to HST mirror -def set_default_waveset(minwave=500, maxwave=26000, num=10000., +def set_default_waveset(minwave=500, maxwave=26000, num=10000, delta=None, log=True): """Set the default wavelength set, ``pysynphot.refs._default_waveset``. @@ -69,6 +69,9 @@ def set_default_waveset(minwave=500, maxwave=26000, num=10000., global _default_waveset global _default_waveset_str + # Must be int for numpy>=1.12 + num = int(num) + s = 'Min: %s, Max: %s, Num: %s, Delta: %s, Log: %s' if log and not delta: diff --git a/pysynphot/test/test_ticket150.py b/pysynphot/test/test_ticket150.py index 8316fa47..2f5fd473 100644 --- a/pysynphot/test/test_ticket150.py +++ b/pysynphot/test/test_ticket150.py @@ -110,7 +110,7 @@ def test_integrate(self): def test_subint(self): w = self.bp.wave - tst = self.bp.integrate(w[0:len(w)/2]) + tst = self.bp.integrate(w[0:int(len(w)/2)]) # epsilon due to the nature of trapezoid integration assert abs(self.ref / 2.0 - tst) <= 0.025