def grouped_mean(arr, spike_clusters):
    arr = np.asarray(arr)
    spike_clusters = np.asarray(spike_clusters)
    assert arr.ndim == 1
    assert arr.shape[0] == len(spike_clusters)
    cluster_ids = _unique(spike_clusters)
    spike_clusters_rel = _index_of(spike_clusters, cluster_ids)
    spike_counts = np.bincount(spike_clusters_rel)
    assert len(spike_counts) == len(cluster_ids)
    t = np.zeros(len(cluster_ids))
    # Compute the sum with possible repetitions.
    np.add.at(t, spike_clusters_rel, arr)
    return t / spike_counts
Initialises a new instance of a Firefox Profile
dataset/ETHPy150Open kwikteam/phy/phy/io/array.py/grouped_mean--crossover with--dataset/ETHPy150Open apiad/sublime-browser-integration/selenium/webdriver/firefox/firefox_profile.py/FirefoxProfile.__init__