From 37b4e3d8e2e9c7f879b7bc32a84b062450542eb5 Mon Sep 17 00:00:00 2001 From: Kyle Barbary Date: Fri, 3 Sep 2021 16:34:39 -0700 Subject: [PATCH] fix numpy type deprecations --- .gitignore | 6 +++++- extinction.pyx | 12 ++++++------ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 3a9c2be..5cec9c7 100644 --- a/.gitignore +++ b/.gitignore @@ -68,4 +68,8 @@ target/ .ipynb_checkpoints # emacs -*~ \ No newline at end of file +*~ + +# Pipenv +Pipfile +Pipfile.lock diff --git a/extinction.pyx b/extinction.pyx index 5103fce..5323ca3 100644 --- a/extinction.pyx +++ b/extinction.pyx @@ -154,10 +154,10 @@ def ccm89(double[:] wave, double a_v, double r_v, unit='aa', double b = 0.0 if out is None: - out = np.empty(n, dtype=np.float) + out = np.empty(n, dtype=np.float64) else: assert out.shape == wave.shape - assert out.dtype == np.float + assert out.dtype == np.float64 cdef scalar_func convert_wave if unit == 'aa': @@ -262,10 +262,10 @@ def odonnell94(double[:] wave, double a_v, double r_v, unit='aa', double b = 0.0 if out is None: - out = np.empty(n, dtype=np.float) + out = np.empty(n, dtype=np.float64) else: assert out.shape == wave.shape - assert out.dtype == np.float + assert out.dtype == np.float64 cdef scalar_func convert_wave if unit == 'aa': @@ -697,10 +697,10 @@ def calzetti00(double[:] wave, double a_v, double r_v, unit='aa', double b = 0.0 if out is None: - out = np.empty(n, dtype=np.float) + out = np.empty(n, dtype=np.float64) else: assert out.shape == wave.shape - assert out.dtype == np.float + assert out.dtype == np.float64 cdef scalar_func convert_wave if unit == 'aa':