Skip to content

Commit

Permalink
replace removed npy.float_ with npy.float64
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamOrmondroyd committed Sep 10, 2024
1 parent 3b2f4b1 commit b7667f2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/fastkde/fastKDE.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,9 @@ def vprint(msg):
data_rank = len(npy.shape(data))
# If the data are a vector, promote the data to a rank-1 array with only 1 column
if data_rank == 1:
data = npy.array(original_data[npy.newaxis, :], dtype=npy.float_)
data = npy.array(original_data[npy.newaxis, :], dtype=npy.float64)
else:
data = npy.array(original_data, dtype=npy.float_)
data = npy.array(original_data, dtype=npy.float64)
if data_rank > 2:
raise ValueError(
"data must be a rank-2 array of shape [num_variables,num_data_points]"
Expand Down Expand Up @@ -1642,7 +1642,7 @@ def pdf_at_points(*args, **kwargs):
# make sure list_of_points is in the expected format
if list_of_points_provided_in_kwargs:
try:
list_of_points = npy.array(list_of_points, copy=True, dtype=npy.float_).T
list_of_points = npy.array(list_of_points, copy=True, dtype=npy.float64).T
except ValueError:
raise RuntimeError("Could not convert list_of_points to a numpy array.")

Expand All @@ -1652,7 +1652,7 @@ def pdf_at_points(*args, **kwargs):
# If the data are a vector, promote the data to a rank-1 array with only
# 1 column
if data_rank == 1:
list_of_points = npy.array(list_of_points[npy.newaxis, :], dtype=npy.float_)
list_of_points = npy.array(list_of_points[npy.newaxis, :], dtype=npy.float64)

if data_rank > 2:
# raise an error indicating the proper shape for list_of_points
Expand Down

0 comments on commit b7667f2

Please sign in to comment.