Skip to content

Commit

Permalink
fix numpy type deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
kbarbary committed Sep 3, 2021
1 parent c192e16 commit 37b4e3d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,8 @@ target/
.ipynb_checkpoints

# emacs
*~
*~

# Pipenv
Pipfile
Pipfile.lock
12 changes: 6 additions & 6 deletions extinction.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -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':
Expand Down Expand Up @@ -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':
Expand Down Expand Up @@ -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':
Expand Down

0 comments on commit 37b4e3d

Please sign in to comment.