1

我正在计算 geopandas df 的权重矩阵。我知道有一个关键字可以让我静音 island 警告 ( 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'

任何帮助将非常感激。谢谢!

4

1 回答 1

3

辅助函数使用“silent”参数,而 W 对象使用“silent_island_warning”参数。

wt = ps.weights.DistanceBand.from_dataframe(df, threshold=600000, binary=True, silent=True)

见源:https ://github.com/pysal/pysal/blob/master/pysal/weights/Distance.py

于 2018-05-04T14:00:27.823 回答