code: function checkEqualDimensions (x, y) {
    const xsize = x.size()
    const ysize = y.size()
  
    if (xsize.length !== ysize.length) {
      throw new DimensionError(xsize.length, ysize.length)
    }
  }
docs: Check whether matrix x and y have the same number of dimensions.
  Throws a DimensionError when dimensions are not equal
  @param {Matrix} x
  @param {Matrix} y