I am having problems with adding returned arrays from functions. Basically I have two functions, single_loads and element_loads, that return me an numpy array.
Now I want to add these two returned arrays, force_vector_single_loads and force_vector_element_loads, in a new function called force_vector. Of course, I can just call these two functions in the force_vector function, but I want to do it separately. By separately, I mean that I want to add the two arrays that have already been calculated, and not execute them in the functions first. How can I do this?
Like this:
def single_loads(self):
...
return force_vector_single_loads
def element_loads(self):
...
return force_vector_element_loads
def force_vector(self):
force_vector = "force_vector_single_loads" + "force_vector_element_loads"
return force_vector