Module Hub Beta

ML.MATRIX.ADD

matrix1 matrix2 sum

The result of adding the two matrices stored in matrix1 and matrix2 is set in sum.

Return Value

Simple string reply

Examples

redis> ML.MATRIX.SET a 2 3 1 2 5 3 4 6
OK
redis> ML.MATRIX.SET b 2 3 1 2 3 4 7 1
OK
redis> ML.MATRIX.ADD a b ab
OK
redis> ML.MATRIX.GET ab
1) (integer) 2
2) (integer) 3
3) “2”
4) “3”
5) “8”
6) “7”
7) “11”
8) “7”

© 2017 Redis Labs, Inc. All rights reserved.