ruby-numo / numo-linalg

Linear Algebra Library for Ruby/Numo::NArray
BSD 3-Clause "New" or "Revised" License
37 stars 9 forks source link

Fix NoMethodError and TypeError about _make_complex_eigvecs method #6

Closed yoshoku closed 6 years ago

yoshoku commented 6 years ago

This pull request fixes the bugs about the _make_complex_eigvecs method. To make class methods in Module private, it should to use the private_class_method method. In addition, the | operator has higher precedence than the > operator.

I found the bugs when I gave a matrix of Numo::DFloat to the Numo::Linalg::eig method.

x = Numo::DFloat.new(3, 3).rand
Numo::Linalg::eig(x)