a=[[“doc1”,[“hi”,“bye”,“guy”],[],[],[]],[“doc2”,[“bye”,“now”,“is”,“hi”,“hi”,“hi”],[],[],[]],[“doc3”,[“bye”,“now”,“is”,“hi”,“hi”,“hi”,“why”,“go”,“guy”],[],[],[]]]
i have this array i’d like to multiply the 2nd inner array with the 3rd
inner array and fill the 4th inner array with these results but i don’t
know how to do it. by the way the 2nd and the third inner array are of
type float.
anybody ca help please?
and thanks in advance:)
a.each{
|x|
x.each{
|y|
y.each{ #i have the error in here
}
}
}
and the error is
tester.rb:50: undefined method each' for 1:Fixnum (NoMethodError) from tester.rb:48:in
each’
from tester.rb:48
from tester.rb:46:in `each’
from tester.rb:46