import numpy as np # Import the NumPy library and give it an alias "np"
# Define an integer vector using numpy
int_vector = np.array([1, 2, 3, 4])
# Convert each integer in the vector to a
# 4-bit binary representation
binary_vector = np.array([list(np.binary_repr(i, width=4)) for i in int_vector])
# Reshape the binary vector into a 2D matrix
# with 4 columns and as many rows as needed
binary_matrix = binary_vector.reshape(-1, 4).astype(int)
# Print the resulting binary matrix
print(binary_matrix)