Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve depreciation, change np.float64 to float #52

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions mplstereonet/contouring.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def _count_points(lons, lats, func, sigma, gridsize=(100,100), weights=None):
if weights is None:
weights = 1
# Normalize the weights
weights = np.asarray(weights, dtype=np.float64)
weights = np.asarray(weights, dtype=float)
weights /= weights.mean()

# Generate a regular grid of "counters" to measure on...
Expand All @@ -31,7 +31,7 @@ def _count_points(lons, lats, func, sigma, gridsize=(100,100), weights=None):
# Basically, we can't model this as a convolution as we're not in cartesian
# space, so we have to iterate through and call the kernel function at
# each "counter".
totals = np.zeros(xyz_counters.shape[0], dtype=np.float64)
totals = np.zeros(xyz_counters.shape[0], dtype=float)
for i, xyz in enumerate(xyz_counters):
cos_dist = np.abs(np.dot(xyz, xyz_points.T))
density, scale = func(cos_dist, sigma)
Expand Down
2 changes: 1 addition & 1 deletion mplstereonet/stereonet_math.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ def plane(strike, dip, segments=100, center=(0, 0)):
"""
lon0, lat0 = center
strikes, dips = np.atleast_1d(strike, dip)
lons = np.zeros((segments, strikes.size), dtype=np.float64)
lons = np.zeros((segments, strikes.size), dtype=float)
lats = lons.copy()
for i, (strike, dip) in enumerate(zip(strikes, dips)):
# We just plot a line of constant longitude and rotate it by the strike.
Expand Down