peak_indices = peak.peak_local_max(trivial, min_distance=1, indices=True)asserttype(peak_indices)isnp.ndarrayassertnotpeak_indices# inherent boolean-ness of empty listpeaks = peak.peak_local_max(trivial, min_distance=1, indices=False)assert(peaks.astype(np.bool) == trivial).all() 开发者ID...