pysal.lib.weights.min_threshold_distance(data, p=2)[源代码]¶获取最大最近邻距离。
| 参数: |
|
|---|---|
| 返回: |
|
实例
>>> from pysal.lib.weights.util import min_threshold_distance
>>> import numpy as np
>>> x, y = np.indices((5, 5))
>>> x.shape = (25, 1)
>>> y.shape = (25, 1)
>>> data = np.hstack([x, y])
>>> min_threshold_distance(data)
1.0