# 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
M_int = np.sum(X.astype(int) == X, axis=1) == X.shape[1]

# Filter the array to keep rows that sum to the target value
M_sum = np.sum(X, axis=1) == n

# Combine the filters using logical AND
M = np.logical_and(M_int, M_sum)

# Print the filtered array
print(X[M])