Skip to content

Commit

Permalink
Merge pull request #45 from dysonreturns/main
Browse files Browse the repository at this point in the history
Pairwise euclidian forwards emtpy y to squared_error
  • Loading branch information
yoshoku authored Dec 20, 2023
2 parents 9eef8b7 + 7d06e99 commit fbbb628
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion rumale-core/lib/rumale/pairwise_metric.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ module PairwiseMetric
# @param y [Numo::DFloat] (shape: [n_samples_y, n_features])
# @return [Numo::DFloat] (shape: [n_samples_x, n_samples_x] or [n_samples_x, n_samples_y] if y is given)
def euclidean_distance(x, y = nil)
y = x if y.nil?
Numo::NMath.sqrt(squared_error(x, y).abs)
end

Expand Down

0 comments on commit fbbb628

Please sign in to comment.