aesara
aesara copied to clipboard
Allow to set the name of a cloned variable with `clone(name="name")`
To set the name of a cloned variable we need to do:
import aesara.tensor as at
x = at.vector("x")
x_clone = x.clone()
x_clone.name = f"{x.name}_clone"
where it would be more succinct to be able to write:
import aesara.tensor as at
x = at.vector("x")
x_clone = x.clone(name=f"{x.name}_clone")
I can take a look at this. Seems to only be in one location at first glance. Are there any of the initializations in type module that act differently? Appears they all inherit from the same.
By all means! You may want to do a project search for def clone
, this is a part of the codebase I don't know very well.