#NEWLINE# def _partition_estimators( n_estimators , n_jobs ) : #NEWLINE# #INDENT# 'Private function used to partition estimators between jobs.' #NEWLINE# n_jobs = min ( _get_n_jobs ( n_jobs ) , n_estimators ) #NEWLINE# n_estimators_per_job = ( ( n_estimators // n_jobs ) * np . ones ( n_jobs , dtype = np . int ) ) #NEWLINE# n_estimators_per_job [ : ( n_estimators % n_jobs ) ] += 1 #NEWLINE# starts = np . cumsum ( n_estimators_per_job ) #NEWLINE# return ( n_jobs , n_estimators_per_job . tolist ( ) , ( [ 0 ] + starts . tolist ( ) ) )