pysal / segregation

Segregation Measurement, Inferential Statistics, and Decomposition Analysis
https://pysal.org/segregation/
BSD 3-Clause "New" or "Revised" License
111 stars 26 forks source link

convert nans to 0 in entropy index #178

Closed knaaptime closed 3 years ago

knaaptime commented 3 years ago

this line can result in an array that has NaNs, which can result in (invalid) negative values for the index. Using np.nan_to_num in the subsequent line reolves the issue