From 805eaeac7a40fc0ada1a2e03ff4b4e69aac87e3b Mon Sep 17 00:00:00 2001 From: Rafael <52053058+rflameiro@users.noreply.github.com> Date: Mon, 5 Jun 2023 22:56:02 -0300 Subject: [PATCH] Update graph_data_layer.py Fix AttributeError: module 'numpy' has no attribute 'float' when using numpy version 1.24.0 --- openchem/data/graph_data_layer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openchem/data/graph_data_layer.py b/openchem/data/graph_data_layer.py index f1bbb33..07b85a2 100644 --- a/openchem/data/graph_data_layer.py +++ b/openchem/data/graph_data_layer.py @@ -76,7 +76,7 @@ def __init__(self, return_max_len=True) self.max_len = max_len if target is not None: - target = np.asarray(target, dtype=np.float).T + target = np.asarray(target, dtype=float).T clean_smiles = [clean_smiles[i] for i in clean_idx] num_atoms = [num_atoms[i] for i in clean_idx] self.clean_idx = clean_idx