尝试运行 UMAP 会导致错误:
import pandas as pd
import numpy as np
import umap
df = pd.DataFrame(np.arange(25).reshape(-1,5))
um = umap.UMAP(random_state=0)
um.fit(df)
PicklingError: ("Can't pickle <class 'numpy.dtype[float32]'>: it's not found as numpy.dtype[float32]", 'PicklingError while hashing array([[ 0., 1., 2., 3 ., 4.],\n [ 5., 6., 7., 8., 9.],\n [10., 11., 12., 13., 14.],\n [15., 16., 17., 18., 19.],\n
[20., 21., 22., 23., 24.]], dtype=float32): PicklingError("Can't pickle <class 'numpy. dtype[float32]'>: 找不到 numpy.dtype[float32]")')
我该如何解决这个问题?