museotoolbox.stats.Moran.get_n_neighbors

Moran.get_n_neighbors(array, footprint, weights)[source]

Get number of neighbors according to your array and to a footprint.

Parameters
  • array (array-like, shape = [X,Y]) – The input array.

  • footprint (array-like, shape = [X,Y]) – The footprint array.

  • weights (array-like, shape = [X,Y]) – The weight for each cell.

Returns

w – The number of neighbors.

Return type

int