if foundImageField:
dataBlocks.append(dataBlock)
indices = np.random.rand(len(dataBlocks),maxLoops,maxRows,3)
for i, dataBlock in enumerate(dataBlocks):
for j, loop in enumerate(dataBlock):
for k in range(loop.numRows):
indices[i,j,k] = np.array([i,j,k])
After Change
if loop.numRows > maxRows:
maxRows = loop.numRows
indices = np.zeros((len(loops),maxRows,2),dtype=int)
for j, loop in enumerate(dataBlock):
for k in range(loop.numRows):
indices[j,k] = np.array([j,k])