Please confirm that the function
def PS(I, r):
assert len(I.shape) == 3
assert r>0
r = int(r)
O = np.zeros((I.shape[0]*r, I.shape[1]*r, I.shape[2]/(r*2)))
for x in range(O.shape[0]):
for y in range(O.shape[1]):
for c in range(O.shape[2]):
c += 1
a = np.floor(x/r).astype("int")
b = np.floor(y/r).astype("int")
d = c*r*(y%r) + c*(x%r)
print a, b, d
O[x, y, c-1] = I[a, b, d]
return O
does not implement the PS(T)_{x,y,c} :

In particular, the line in PS(I,r)
does not implement the index in PS(T)_{x,y,c}
C * r * mod(y,r) + C * mod(x,r) + c
where capital letter C and small letter c are two different things.
Please confirm that the function
does not implement the

PS(T)_{x,y,c}:In particular, the line in
PS(I,r)does not implement the index in
PS(T)_{x,y,c}where capital letter
Cand small lettercare two different things.