查看python中某种算法的源代码

查看python中某种算法的源代码,比如说查看KMeans算法的源代码:

from sklearn.cluster import KMeans

import inspect as ist
ist.getsource(KMeans)

猜你喜欢

转载自blog.csdn.net/yanpenggong/article/details/80074928