def bond_initialize_canonical_averages(<EOL>canonical_statistics, **kwargs<EOL>):
<EOL>spanning_cluster = (<EOL>'<STR_LIT>' in canonical_statistics.dtype.names<EOL>)<EOL>ret = np.empty_like(<EOL>canonical_statistics,<EOL>dtype=canonical_averages_dtype(spanning_cluster=spanning_cluster),<EOL>)<EOL>ret['<STR_LIT>'] = <NUM_LIT:1><EOL>if spanning_cluster:<EOL><INDENT>ret['<STR_LIT>'] = (<EOL>canonical_statistics['<STR_LIT>']<EOL>)<EOL>ret['<STR_LIT>'] = <NUM_LIT:0.0><EOL><DEDENT>ret['<STR_LIT>'] = (<EOL>canonical_statistics['<STR_LIT>']<EOL>)<EOL>ret['<STR_LIT>'] = <NUM_LIT:0.0><EOL>ret['<STR_LIT>'] = canonical_statistics['<STR_LIT>']<EOL>ret['<STR_LIT>'] = <NUM_LIT:0.0><EOL>return ret<EOL>
Initialize the canonical averages from a single-run cluster statistics

Parameters
----------
canonical_statistics : 1-D structured ndarray
    Typically contains the canonical statistics for a range of values
    of the occupation probability ``p``.
    The dtype is the result of `canonical_statistics_dtype`.

Returns
-------
ret : structured ndarray
    The dype is the result of `canonical_averages_dtype`.

ret['number_of_runs'] : 1-D ndarray of int
    Equals ``1`` (initial run).

ret['percolation_probability_mean'] : 1-D array of float
    Equals ``canonical_statistics['percolation_probability']``
    (if ``percolation_probability`` is present)

ret['percolation_probability_m2'] : 1-D array of float
    Each entry is ``0.0``

ret['max_cluster_size_mean'] : 1-D array of float
    Equals ``canonical_statistics['max_cluster_size']``

ret['max_cluster_size_m2'] : 1-D array of float
    Each entry is ``0.0``

ret['moments_mean'] : 2-D array of float
    Equals ``canonical_statistics['moments']``

ret['moments_m2'] : 2-D array of float
    Each entry is ``0.0``

See Also
--------
canonical_averages_dtype
bond_canonical_statistics