divide by zero encountered in true_divide code example
Example: index.py:14: RuntimeWarning: invalid value encountered in true_divide return np.dot(user, user2) / (norm(user) * norm(user2))
import numpy as np
np.seterr(divide='ignore', invalid='ignore')