def _generate_unsampled_indices(random_state, n_samples):
 sample_indices = _generate_sample_indices(random_state, n_samples)
 sample_counts = bincount(sample_indices, minlength=n_samples)
 unsampled_mask = (sample_counts == 0)
 indices_range = np.arange(n_samples)
 unsampled_indices = indices_range[unsampled_mask]
 return unsampled_indices

def _generate_unsampled_indices ( random_state , n_samples ) : sample_indices = _generate_sample_indices ( random_state , n_samples ) sample_counts = bincount ( sample_indices , minlength = n_samples ) unsampled_mask = ( sample_counts == 0 ) indices_range = np . arange ( n_samples ) unsampled_indices = indices_range [ unsampled_mask ] return unsampled_indices
private function used to forest .