Skip to content

Commit

Permalink
refactor: autocorrect Style/MultipleComparison cop
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshoku committed Jan 12, 2025
1 parent 521bf53 commit ca77495
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/numo/tiny_linalg.rb
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ def norm(a, ord = nil, axis: nil, keepdims: false) # rubocop:disable Metrics/Abc
end
end

raise ArgumentError, "the number of dimensions of axis is inappropriate for the norm: #{axis.size}" unless axis.size == 1 || axis.size == 2
raise ArgumentError, "the number of dimensions of axis is inappropriate for the norm: #{axis.size}" unless [1, 2].include?(axis.size)
raise ArgumentError, "axis is out of range: #{axis}" unless axis.all? { |ax| (-a.ndim...a.ndim).cover?(ax) }

if axis.size == 1
Expand Down

0 comments on commit ca77495

Please sign in to comment.