# Import the NumPy library
import numpy as np
# Define the array
X = np.asarray([[1.0, 0.0, 3.0, 8.0],[2.0, 0.0, 1.0, 1.0],[1.5, 2.5, 1.0, 0.0]])
# Define the target sum
n = 4
# Filter the array to keep rows that have integer values and sum to the target value
M = np.all(X % 1 == 0, axis=1) & (X.sum(axis=1) == n)
# Print the filtered array
print(X[M])