Skip to content

Commit

Permalink
Merge pull request #234 from kvos/development
Browse files Browse the repository at this point in the history
Update SDS_shoreline.py
  • Loading branch information
kvos committed Sep 6, 2021
2 parents 0520c4b + 398128d commit d1a934c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion coastsat/SDS_shoreline.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,8 @@ def classify_image_NN(im_ms, im_extra, cloud_mask, min_beach_area, clf):
# remove NaNs and cloudy pixels
vec_cloud = cloud_mask.reshape(cloud_mask.shape[0]*cloud_mask.shape[1])
vec_nan = np.any(np.isnan(vec_features), axis=1)
vec_mask = np.logical_or(vec_cloud, vec_nan)
vec_inf = np.any(np.isinf(vec_features), axis=1)
vec_mask = np.logical_or(vec_cloud,np.logical_or(vec_nan,vec_inf))
vec_features = vec_features[~vec_mask, :]

# classify pixels
Expand Down

0 comments on commit d1a934c

Please sign in to comment.