I have a function in a script problem1.py:
def normal_method(target):
a = np.array(np.arange(1,target))
divisible_numbers = a[(a%3==0)|(a%5==0)]
sum_value = np.sum(divisible_numbers)
print sum_value
While calling this function in an IPython window using ,
import numpy as np
from problem1 import normal_method
%timeit normal_method(100)
It gives me TypeError saying normal_method takes no arguments. But when I paste the function into IPython and then call it using the same statement it works. Any ideas why this occurs?