Ignore:
Timestamp:
06/07/17 10:50:54 (8 years ago)
Author:
Eric.Larour
Message:

CHG: merged branch back to trunk-jpl 21754.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/branches/trunk-larour-NatGeoScience2016/src/py3/interp/holefiller.py

    r19895 r21759  
    1 import numpy as npy
     1import numpy as np
    22from scipy.spatial import cKDTree
    33
     
    3030        filled=data
    3131       
    32         XYGood=npy.dstack([x[goodids],y[goodids]])[0]
    33         XYBad=npy.dstack([x[badids],y[badids]])[0]
     32        XYGood=np.dstack([x[goodids],y[goodids]])[0]
     33        XYBad=np.dstack([x[badids],y[badids]])[0]
    3434        tree=cKDTree(XYGood)
    3535        nearest=tree.query(XYBad,k=knn)[1]
     
    4242                        for j in range(knn):
    4343                                neardat.append(filled[goodids][nearest[i][j]])
    44                                 filled[badids[i]]=npy.mean(neardat)
     44                                filled[badids[i]]=np.mean(neardat)
    4545                               
    4646        return filled
Note: See TracChangeset for help on using the changeset viewer.