SciRuby / nmatrix

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

More descriptive TypeError from #dot #614

Open v0dro opened 6 years ago

v0dro commented 6 years ago

The #dot method gives the following error if you don't supply it the correct type:

/ruby-2.3.3/gems/nmatrix-lapacke-0.2.4/lib/nmatrix/lapack_ext_common.rb:66:in `dot': expected NMatrix on left-hand side of operation (TypeError)

A good error message should tell us the wrong type that is being passed too for easier debugging.

translunar commented 6 years ago

Can you provide example code? (Meta: This is more of a bug than an enhancement.)