'How to solve Python TypeError: type not understood

I am creating a recommendation system and when I run this code I'm getting an error:

from scipy.sparse.linalg import svds    
# Singular Value Decomposition
U, sigma, Vt = svds(pivot_df, k = 10)

And I'm getting this error: "TypeError: type not understood".

What could be the reason for this error and how should I solve it?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source