data_base
❭ db_initializers
❭ synapse_activation_binning
❭ tree_reduction
tree_reduction¶
-
data_base.db_initializers.synapse_activation_binning.tree_reduction(delayeds, aggregate_fun, length=
7
)¶ Recursively aggregate the results of a list of delayed objects.
This is used in
synapse_activation_postprocess_dask()
andsynapse_activation_postprocess_pandas()
to aggregate the resulting synapse binning (which is in dictionary format) to a single dictionary.- Parameters:¶
delayeds (array) – list of
delayed
objectsaggregate_fun (
delayed
) – Function to aggregate the results with (e.g.merge_results_together()
)length (int) – chunk size for aggregation
Note
Once the delayed objects are evaluated,
aggregate_fun
is applied to the results ofdelayeds
, and thusaggregate_fun
should be able to handle the results ofdelayeds
.