Closed Yongyi-Liu closed 4 years ago
There could be islands with no neighbors
Sent from my iPhone
On Aug 18, 2020, at 3:52 PM, Yongyi-Liu notifications@github.com wrote:
The if condition is always false here, the label could never be assigned -1
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/pysal/spopt/issues/63, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABX5XRY6PW7VQ7QAAJCWLBTSBMAZFANCNFSM4QEHQOEQ .
I see the condition for island. But the condition should be len(NeighborPolys) == 0 instead of len(NeighborPolys) <0 because the length of the neighborhood list cannot be negative
resolved with #64
https://github.com/pysal/spopt/blob/b6676446209d1f176f4456e03b83ba9c86fa61fa/spopt/region/maxp.py#L220
The if condition is always false here, the label could never be assigned -1