Skip to content

Commit

Permalink
thread the NaN replacing function
Browse files Browse the repository at this point in the history
  • Loading branch information
warisa-r committed Sep 16, 2024
1 parent a0e1d3c commit 8173cfb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/shock_point_detectors/2D/image_processing.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ using Statistics: mean

# Function to replace NaNs with the mean of neighboring values for cells near obstacles and obstacles cells
function replace_nan_with_mean!(matrix)
for i in 1:size(matrix, 1)
@threads for i in 1:size(matrix, 1)
for j in 1:size(matrix, 2)
if isnan(matrix[i, j])
# Get the neighborhood (3x3 window) around the NaN value since the kernel size is 3x3
Expand Down

0 comments on commit 8173cfb

Please sign in to comment.