SciRuby / nmatrix

Dense and sparse linear algebra library for Ruby via SciRuby
Other
469 stars 133 forks source link

norm2 alias is incorrect #565

Closed conorwild closed 7 years ago

conorwild commented 7 years ago

Hey all, I'm really enjoying NMatrix - great job to everyone. I ran across a small bug recently when trying to use the norm2 method. It says, "NoMethodErro: undefined method 'nrm2' for #NMatrix..."

I think the alias on line 1139 of of nmatrix/math.rb is backwards. Should it read, "alias :nrm2 :norm2"?

Keep up the great work!

conorwild commented 7 years ago

My mistake, this method is only implemented for vectors, not matrices.