def copy_variable(var):
    clone = var.copy(compute_value=transformation.Identity(var))
    clone.attributes = dict(var.attributes)
    return clone
Exemple #2
0
def clone_attr(attr):
    newvar = attr.copy(compute_value=transformation.Identity(attr))
    newvar.attributes = copy.copy(attr.attributes)
    return newvar