import numpy as np

def normalize(X: np.ndarray) -> np.ndarray:
    """Min-max normalize features to [0,1]."""
    min_vals = X.min(axis=0)
    max_vals = X.max(axis=0)
    return (X - min_vals) / (max_vals - min_vals + 1e-8)
