From 023239e50c06176f2f80b73bc8f1a8926d95f3cc Mon Sep 17 00:00:00 2001 From: Alexandr Fonari Date: Mon, 30 Oct 2023 14:26:46 -0400 Subject: [PATCH] Prevent warning in fingerprint.py during yaml.safe_load ruamel.yaml.safe_load is deprecated: https://sourceforge.net/p/ruamel-yaml/code/ci/0.17.32/tree/main.py#l1110 --- matminer/featurizers/site/fingerprint.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/matminer/featurizers/site/fingerprint.py b/matminer/featurizers/site/fingerprint.py index d1b4ab661..9dd3eac57 100644 --- a/matminer/featurizers/site/fingerprint.py +++ b/matminer/featurizers/site/fingerprint.py @@ -873,7 +873,7 @@ def load_cn_motif_op_params(): with open( os.path.join(os.path.dirname(pymatgen.analysis.local_env.__file__), "cn_opt_params.yaml"), ) as f: - return yaml.safe_load(f) + return yaml.YAML(typ="safe", pure=True).load(f) def load_cn_target_motif_op(): @@ -884,4 +884,4 @@ def load_cn_target_motif_op(): (dict) """ with open(os.path.join(os.path.dirname(__file__), "cn_target_motif_op.yaml")) as f: - return yaml.safe_load(f) + return yaml.YAML(typ="safe", pure=True).load(f)