mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/matrix (transpose): bug fix for Matrix.empty(0,42).t
cf [ruby-core:23598] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25452 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
90d244aded
commit
66ed25f633
1 changed files with 1 additions and 0 deletions
|
@ -858,6 +858,7 @@ class Matrix
|
|||
# 2 4 6
|
||||
#
|
||||
def transpose
|
||||
return Matrix.empty(column_size, 0) if row_size.zero?
|
||||
new_matrix @rows.transpose, row_size
|
||||
end
|
||||
alias t transpose
|
||||
|
|
Loading…
Add table
Reference in a new issue