示例#1
0
 def spatial_hash(coordinates):
     import scipy, scipy.spatial
     try:
         from scipy.spatial import cKDTree as shash
     except:
         from scipy.spatial import KDTree as shash
     return shash(coordinates)
示例#2
0
 def spatial_hashes(coordinates, sigma_bins):
     import scipy, scipy.spatial
     try:
         from scipy.spatial import cKDTree as shash
     except:
         from scipy.spatial import KDTree as shash
     return tuple([shash(coordinates[ii]) for ii in sigma_bins])