Commit 15b1bbd6 authored by yoel shoshan's avatar yoel shoshan Committed by Jennifer
Browse files

suporting newer numpy

parent 51d6a41d
...@@ -110,12 +110,12 @@ def make_sequence_features( ...@@ -110,12 +110,12 @@ def make_sequence_features(
) )
features["between_segment_residues"] = np.zeros((num_res,), dtype=np.int32) features["between_segment_residues"] = np.zeros((num_res,), dtype=np.int32)
features["domain_name"] = np.array( features["domain_name"] = np.array(
[description.encode("utf-8")], dtype=np.object_ [description.encode("utf-8")], dtype=object
) )
features["residue_index"] = np.array(range(num_res), dtype=np.int32) features["residue_index"] = np.array(range(num_res), dtype=np.int32)
features["seq_length"] = np.array([num_res] * num_res, dtype=np.int32) features["seq_length"] = np.array([num_res] * num_res, dtype=np.int32)
features["sequence"] = np.array( features["sequence"] = np.array(
[sequence.encode("utf-8")], dtype=np.object_ [sequence.encode("utf-8")], dtype=object
) )
return features return features
...@@ -148,7 +148,7 @@ def make_mmcif_features( ...@@ -148,7 +148,7 @@ def make_mmcif_features(
) )
mmcif_feats["release_date"] = np.array( mmcif_feats["release_date"] = np.array(
[mmcif_object.header["release_date"].encode("utf-8")], dtype=np.object_ [mmcif_object.header["release_date"].encode("utf-8")], dtype=object
) )
mmcif_feats["is_distillation"] = np.array(0., dtype=np.float32) mmcif_feats["is_distillation"] = np.array(0., dtype=np.float32)
......
...@@ -83,8 +83,8 @@ TEMPLATE_FEATURES = { ...@@ -83,8 +83,8 @@ TEMPLATE_FEATURES = {
"template_aatype": np.int64, "template_aatype": np.int64,
"template_all_atom_mask": np.float32, "template_all_atom_mask": np.float32,
"template_all_atom_positions": np.float32, "template_all_atom_positions": np.float32,
"template_domain_names": np.object, "template_domain_names": object,
"template_sequence": np.object, "template_sequence": object,
"template_sum_probs": np.float32, "template_sum_probs": np.float32,
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment