import numpy as np

# Create a 3x3 array of zeros
matrix = np.zeros((3, 3), dtype=int)
# Assign values from 0 to 8 to the array using indexing
matrix[0, 0] = 0
matrix[0, 1] = 1
matrix[0, 2] = 2
matrix[1, 0] = 3
matrix[1, 1] = 4
matrix[1, 2] = 5
matrix[2, 0] = 6
matrix[2, 1] = 7
matrix[2, 2] = 8
print(matrix)