http://qs1969.pair.com?node_id=1176969


in reply to Re^2: how to get average of matrices' elements?
in thread how to get average of matrices' elements?

That map is wrong, we're not building a hash.
Please try running my code before you make such a claim. My code creates an array-of-arrays data structure with all elements initialized to 0.

UPDATE: see my updated code.

  • Comment on Re^3: how to get average of matrices' elements?

Replies are listed 'Best First'.
Re^4: how to get average of matrices' elements?
by Anonymous Monk on Nov 30, 2016 at 19:39 UTC
    I did run your code. Here's the output from Data::Dump:
    [[1, 0, 2, 0, 3, 0], [1, 0, 2, 0, 3, 0], [1, 0, 2, 0, 3, 0]]