Skip to content

Commit

Permalink
change np floats to float 64s
Browse files Browse the repository at this point in the history
  • Loading branch information
jonpvandermause committed Sep 15, 2024
1 parent 5caf8a6 commit f8ba2c0
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion flare/descriptors/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ def setup_mask(self, cutoffs_mask):
self.cut3b_mask = cutoffs_mask.get("cut3b_mask", None)
if "threebody_cutoff_list" in cutoffs_mask:
self.threebody_cutoff_list = np.array(
cutoffs_mask["threebody_cutoff_list"], dtype=np.float
cutoffs_mask["threebody_cutoff_list"], dtype=np.float64
)

def compute_env(self):
Expand Down
2 changes: 1 addition & 1 deletion flare/utils/parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ def check_instantiation(hyps, cutoffs, kernels, param_dict):

# Ensure typed correctly as numpy array
param_dict["original_hyps"] = nparray(
param_dict["original_hyps"], dtype=np.float
param_dict["original_hyps"], dtype=np.float64
)
if (len(param_dict["original_hyps"]) - 1) not in param_dict["map"]:
assert (
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
numpy >=1.18, <1.23
numpy
scipy
memory_profiler
numba
Expand Down
8 changes: 4 additions & 4 deletions tests/test_grid_kernel.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,10 @@ def get_reference(grid_env, species, parameter, kernel_name, same_hyps):
)
args = from_mask_to_args(hm["hyps"], hm["cutoffs"], None if same_hyps else hm)

energy_force = np.zeros(3, dtype=np.float)
# force_force = np.zeros(3, dtype=np.float)
# force_energy = np.zeros(3, dtype=np.float)
# energy_energy = np.zeros(3, dtype=np.float)
energy_force = np.zeros(3, dtype=np.float64)
# force_force = np.zeros(3, dtype=np.float64)
# force_energy = np.zeros(3, dtype=np.float64)
# energy_energy = np.zeros(3, dtype=np.float64)
for i in range(3):
energy_force[i] = force_en_kernel(env, grid_env, i + 1, *args)
# force_energy[i] = force_en_kernel(env, grid_env, i, *args)
Expand Down

0 comments on commit f8ba2c0

Please sign in to comment.