使用 geopandas df 在 PySAL 权重命令中静音警告
Silence warning in PySAL weights command using geopandas df
我正在计算 geopandas df 的权重矩阵。我知道有一个关键字可以让我关闭孤岛警告 (pysal doc),但是当我尝试使用它时出现关键字错误...
wt = ps.weights.DistanceBand.from_dataframe(df, threshold=600000, binary=True, silent_island_warning=True)
错误...
TypeError: __init__() got an unexpected keyword argument 'silent_island_warning'
如有任何帮助,我们将不胜感激。谢谢!
辅助函数使用 'silent' 参数,与使用 'silent_island_warning' 参数的 W 对象相反。
wt = ps.weights.DistanceBand.from_dataframe(df, threshold=600000, binary=True, silent=True)
查看来源:https://github.com/pysal/pysal/blob/master/pysal/weights/Distance.py
我正在计算 geopandas df 的权重矩阵。我知道有一个关键字可以让我关闭孤岛警告 (pysal doc),但是当我尝试使用它时出现关键字错误...
wt = ps.weights.DistanceBand.from_dataframe(df, threshold=600000, binary=True, silent_island_warning=True)
错误...
TypeError: __init__() got an unexpected keyword argument 'silent_island_warning'
如有任何帮助,我们将不胜感激。谢谢!
辅助函数使用 'silent' 参数,与使用 'silent_island_warning' 参数的 W 对象相反。
wt = ps.weights.DistanceBand.from_dataframe(df, threshold=600000, binary=True, silent=True)
查看来源:https://github.com/pysal/pysal/blob/master/pysal/weights/Distance.py