From 5ac0365f7cc2ae726a5e665cc17e7a96d0076625 Mon Sep 17 00:00:00 2001 From: Rory Conlin Date: Fri, 15 Mar 2024 23:52:39 -0400 Subject: [PATCH] Don't keep reference to data_index in alias partial objects --- desc/compute/data_index.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/desc/compute/data_index.py b/desc/compute/data_index.py index 285d851d77..8b3686aa85 100644 --- a/desc/compute/data_index.py +++ b/desc/compute/data_index.py @@ -28,7 +28,7 @@ def find_permutations(primary, separator="_"): def assign_alias_data( - alias, primary, base_class, data_index, params, profiles, transforms, data, **kwargs + alias, primary, fun, params, profiles, transforms, data, **kwargs ): """Assigns primary data to alias. @@ -45,9 +45,7 @@ def assign_alias_data( computed data dictionary (includes both alias and primary) """ - data = data_index[base_class][primary]["fun"]( - params, transforms, profiles, data, **kwargs - ) + data = fun(params, transforms, profiles, data, **kwargs) data[alias] = data[primary].copy() return data @@ -160,8 +158,7 @@ def _decorator(func): assign_alias_data, alias=alias, primary=name, - base_class=base_class, - data_index=data_index, + fun=data_index[base_class][name]["fun"], ) flag = True