YAPM.Matrix

Adds a math matrix.

class YAPM.Matrix.Matrix(MatrixValues: Sequence[Sequence[int]])

Creates A Matrix that can be used for many different math uses.

Parameters:

MatrixValues (Sequence[Sequence[int]]) – The values for the matrix (indexs y then x.)

Raises:

ValueError – MatrixValues isn’t a 2d int list

GetValue(x, y)

Get a value from the matrix at y, x.

Parameters:
  • x (int) – the x value of the element to get.

  • y (int) – the y value of the element to get.

Returns int:

the value at the y, x cords.

Raises:

ValueError – the value at y, x doesn’t exist.