Running
np.log(math.factorial(21))
throws an AttributeError: log. Why is that? I could imagine a ValueError, or
AttributeError: log
ValueError
Prefer the math.log() function, that does the job even on long integers.
math.log()