Add a border of zeros around the 2-D tensor Z: one extra row of zeros above and below, and one extra column of zeros to the left and right.
Z
solve(...)