pysal / gwr

This is a repository for the geographically-weighted regression submodule of the Python Spatial Analysis Library
BSD 2-Clause "Simplified" License
16 stars 16 forks source link

calling `search` modifies the method `search`, so it can only be called once. #16

Closed ljwolf closed 6 years ago

ljwolf commented 6 years ago

When you call Sel_BW(...).search(criterion='something', search='something'), the search method actually overwrites itself on line 172. So you can't run it again without instantiating it again, and the error is really cryptic (since search is now a string, you get "str object is not callable" when you've not done anything with strings?)

I'd like to change this to assign to self.search_method or something.

TaylorOshan commented 6 years ago

Definitely not a feature! Changing from self.search to self.search_method seems like a solid straight forward solution.

ljwolf commented 6 years ago

will ship with #13 then

ljwolf commented 6 years ago

resolved by 13