The option ravel_peaks does nothing here, I used it to reshape the peaks as (shape, npeaks*3) for visualisation or (shape, npeaks, 3) for all other processing matters. This snippet will make it more clearer

# Stuff happens before

    # The fibernavigator only supports float32. Since this form is mainly
    # for external visualisation, we enforce float32.
    if ravel_peaks:
        peak_dirs = peak_dirs.reshape(shape + (3*npeaks,)).astype('float32')