code: def solve(A, x):
      
      # https://stackoverflow.com/a/48387507/353337
      x = numpy.asarray(x)
      return numpy.linalg.solve(A, x.reshape(x.shape[0], -1)).reshape(x.shape)
docs: Solves a linear equation system with a matrix of shape (n, n) and an
      array of shape (n, ...). The output has the same shape as the second
      argument.