Am looking to pass numpy arrays as arguments to a function? How is this done? Can i simply pass it like variables as shown below?
def force(x,y,z):
for i in range(N):
for j in range(i+1,N,1):
xij=x[i]-x[j]
yij=y[i]-y[j]
zij=z[i]-z[j]
Python is a dynamic language, meaning there is no type checking done during compilation. You can pass anything into a function.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With