From: ruby@... Date: 2019-05-23T19:57:29+00:00 Subject: [ruby-core:92803] [Ruby trunk Bug#15869] Add abs to Matrix Issue #15869 has been reported by bonafernando (Fernando Wolf Bona). ---------------------------------------- Bug #15869: Add abs to Matrix https://bugs.ruby-lang.org/issues/15869 * Author: bonafernando (Fernando Wolf Bona) * Status: Open * Priority: Normal * Assignee: * Target version: * ruby -v: * Backport: 2.4: UNKNOWN, 2.5: UNKNOWN, 2.6: UNKNOWN ---------------------------------------- While I was studying Markov Chain I had to find the maximum absolute value of the Matrix to divide the matrix in numbers from 0 to 1 to be able to make further analysis. Like this: ``` q = Matrix[ ... ] max = q.to_a.flatten.map { |e| e.abs }.max q = q / max ``` So this is the first of two features that I would like to contribute. 1. Matrix.abs 2. Matrix.max -- https://bugs.ruby-lang.org/ Unsubscribe: