import numpy as np
arr = np.arange(1, 101)
arr.shape = (10, 10)
for i in range(len(arr)):
arr[i] = np.zeros(10, dtype='int8')
for i in range(1, len(arr) - 3):
for k in range(4, len(arr[i]) - 2):
arr[i][k] = np.random.randint(1, 100, dtype='int8')
print(arr)