Skip to content

Commit

Permalink
Merge pull request #13 from andreasskeidsvoll/d2r-fix
Browse files Browse the repository at this point in the history
Replace missing d2r with np.deg2rad
  • Loading branch information
klaundal authored Sep 18, 2024
2 parents 4c7b0be + 47360f1 commit 6b1e6b7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

setuptools.setup(
name="ppigrf",
version="2.0.0",
version="2.0.1",
author="Karl Laundal",
author_email="readme@file.md",
description="Pure Python IGRF",
Expand Down
4 changes: 2 additions & 2 deletions src/ppigrf/ppigrf.py
Original file line number Diff line number Diff line change
Expand Up @@ -670,8 +670,8 @@ def igrf_V(r, theta, phi, date, coeff_fn = shc_fn):
h = h.interpolate(method = 'time').loc[date, :]

# compute cosmlon and sinmlon:
cosmphi = np.cos(phi * d2r * m) # shape (n_coords x n_model_params/2)
sinmphi = np.sin(phi * d2r * m)
cosmphi = np.cos(np.deg2rad(phi * m)) # shape (n_coords x n_model_params/2)
sinmphi = np.sin(np.deg2rad(phi * m))

# make versions of n and m that are repeated twice
nn, mm = np.tile(n, 2), np.tile(m, 2)
Expand Down

0 comments on commit 6b1e6b7

Please sign in to comment.