From: matz@... (Yukihiro Matsumoto) Date: 2000-03-17T10:58:25+09:00 Subject: [ruby-talk:01940] Re: Matrix inconsistent ERR Hi, In message "[ruby-talk:01920] Matrix inconsistent ERR" on 00/03/16, "Dat Nguyen" writes: | |ruby> require 'matrix' |ruby> m1 = Matrix[[1,2,3],[4,5]] |Matrix[[1,2,3],[4,5]] |ruby> m2 = Matrix[[2,1],[6,8]] |Matrix[[2,1],[6,8]] |m3 = m1 * m2 |#{self.name} dimension mismatch" |ERR: /Program/Ruby/matrix.rb:415:in `*': Matrix dimension mismatch |ruby> m3 = m2 * m1 |ERR: /Program/Ruby/matrix.rb:424:in `*': nil can't be coerced into Fixnum | |Question: Why the error messages are different? Because Matrix[[1,2,3],[4,5]] i.e. |1 2 3| |4 5 | is not a matrix. But I think inconsistent error message is not intended. I ask for the author of matrix.rb to change this. matz.