I am trying to run the following function defined on a separate python file using jupyter notebook
def f(x):
return 2 * norm.cdf(x)
AttributeError: 'function' object has no attribute 'cdf'
However, I am getting an Attribute error. I am not sure what is exactly going on as I imported the module correctly in the .py file.
There are plenty of
norm()s in the sea, so your problem is very likely that you are not calling thenorm()that you think you are. It is always good to be verbose :)