Hi I have a question of why I'm getting this error message:
The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
When I'm trying to run this function, and pass in a NumPy array:
testValues=np.arange(-5,5,0.01)
def factorial(n):
if n == 0:
return 0
else:
return 1
factorial(testValues)
Appreciate any help!