import numpy as np
# Create arrays of x and y coordinates
array_x = np.arange(5)
array_y = np.arange(5)
# Use meshgrid to create a grid of coordinates
X, Y = np.meshgrid(array_x, array_y)
# Create a 5x5 array with all elements set to 1
array = np.ones((5, 5))
# Set all elements inside the border to 0
array[(X != 0) & (X != 4) & (Y != 0) & (Y != 4)] = 0
print(array)