You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am running the example of spatial smoothing and got an error. I tested on pythong 2.7 and 3.7. Both are not working.
from pysal.esda import smoothing as sm
from pysal import knnW
sids = pysal.open(pysal.examples.get_path("sids2.shp"), 'r')
sids_d = np.array([i.centroid for i in sids])
sids_w = knnW(sids_d,k=5)
if not sids_w.id_order_set: sids_w.id_order = sids_w.id_order
triples = sm.Headbanging_Triples(sids_d,sids_w,k=5)
This is the error i got:
---------------------------------------------------------------------------
DeprecationWarning Traceback (most recent call last)
<ipython-input-10-5a0dd4e927b9> in <module>()
4 sids_w = knnW(sids_d,k=5)
5 if not sids_w.id_order_set: sids_w.id_order = sids_w.id_order
----> 6 triples = sm.Headbanging_Triples(sids_d,sids_w,k=5)
/apps/opt/anaconda3/envs/sm/lib/python2.7/site-packages/pysal/esda/smoothing.pyc in __init__(self, data, w, k, t, angle, edgecor)
1688 """
1689 def __init__(self, data, w, k=5, t=3, angle=135.0, edgecor=False):
-> 1690 raise DeprecationWarning('Deprecated. This function is no longer supported.')
1691 if k < 3:
1692 raise ValueError("w should be NeareastNeighbors instance & the number of neighbors should be more than 3.")
DeprecationWarning: Deprecated. This function is no longer supported.
Can anyone please suggest how to fix this?
The text was updated successfully, but these errors were encountered:
KarenChen9999
changed the title
Error of DeprecationWarning when runnig spatial smoothing
DeprecationWarning when running spatial smoothing
Apr 14, 2020
Thanks for reporting the issue. We have deprecated that function as the original maintainer has left the project and the code is in need of refactoring for correctness. Until we have a new maintainer to work on this we have deprecated that specific piece of functionality.
It seems that this function has been deprecated from old releases as well. The package i tried was 1.14.4. I thought this only occurred to the new release. Would be possible to get this function work for the old release?
I am running the example of spatial smoothing and got an error. I tested on pythong 2.7 and 3.7. Both are not working.
This is the error i got:
Can anyone please suggest how to fix this?
The text was updated successfully, but these errors were encountered: