This website requires JavaScript.
Explore
Help
Register
Sign in
aparler
/
RosettaCodeData
Watch
1
Star
0
Fork
You've already forked RosettaCodeData
0
Code
Issues
12
Pull requests
3
Projects
Releases
Packages
Wiki
Activity
Actions
master
RosettaCodeData
/
Task
/
Matrix-multiplication
/
Ruby
/
matrix-multiplication-2.rb
8 lines
122 B
Ruby
Raw
Permalink
Normal View
History
Unescape
Escape
A-M baby
2013-04-10 21:29:02 -07:00
def
matrix_mult
(
a
,
b
)
a
.
map
do
|
ar
|
b
.
transpose
.
map
do
|
bc
|
Time for an 2014 update…
2014-01-17 05:32:22 +00:00
ar
.
zip
(
bc
)
.
map
(
&
:*
)
.
inject
(
&
:+
)
A-M baby
2013-04-10 21:29:02 -07:00
end
end
end
Reference in a new issue
Copy permalink