Skip to content

Commit

Permalink
Fix NaN bug when using kdtree_build #3
Browse files Browse the repository at this point in the history
  • Loading branch information
kdheepak committed Sep 24, 2017
1 parent 2edb697 commit 4a88049
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/faLocalAvg.m
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,7 @@ function build_func(obj)
if size(obj.NewPts, 1) > 1
% (3) Build smaller kd-tree of new points
try
norm_new_pts = double(norm_new_pts); % Added by Li Wang on 9/22/2017
new_pt_tree = kdtree_build(norm_new_pts);
catch exception
if strcmpi(exception.identifier, 'MATLAB:UndefinedFunction')
Expand Down Expand Up @@ -398,6 +399,7 @@ function build_func(obj)

% construct the kd tree
try
norm_store_pts = double(norm_store_pts); %Added by Li Wang on 9/22/2017
obj.Func = kdtree_build(norm_store_pts);
catch exception
if strcmpi(exception.identifier, 'MATLAB:UndefinedFunction')
Expand Down

0 comments on commit 4a88049

Please sign in to comment.