d is called n_features in sklearn