For example, take the code
import numpy as np
np_function = np.add
np.__dict__.update({"add": 10})
print(np.add, np_function)
np.add
gives 10, but np_function
still points to the original numpy function, since it was assigned before the update of the dictionary. Is there any way for us to update the value of np_function
if the value of np.add
changes?