<jupyter_start><jupyter_text>hold_peaks  Import packages<jupyter_code>import numpy as np
import porespy as ps
import scipy.ndimage as spim
import matplotlib.pyplot as plt
import skimage
ps.visualization.set_mpl_style()<jupyter_output><empty_output><jupyter_text>Create image and variables<jupyter_code>im = ps.generators.blobs(shape=[500, 500])
im = im.astype(np.float32)
plt.figure(figsize=[7,7])
plt.axis(False)
plt.imshow(im)

#default values:
axis=-1<jupyter_output><empty_output><jupyter_text>Apply filter function<jupyter_code>x = ps.filters.hold_peaks(im=im, axis=axis)
xx = ps.filters.hold_peaks(im=im, axis=0)

fig, ax = plt.subplots(1, 2, figsize=[15, 15]);
ax[0].imshow(x);
ax[1].imshow(xx);
ax[0].axis(False)
ax[1].axis(False)
ax[0].set_title('axis = -1')
ax[1].set_title('axis = 0');<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1585956416464891, 'fraction_numerical': 0.031476997578692496, 'mean_word_length': 8.292134831460674, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '372397', 'license': 'MIT', 'n_tokens_mistral': 361, 'n_tokens_neox': 345, 'n_words': 55, 'path': 'examples/filters/howtos/hold_peaks.ipynb', 'repo_name': 'jamesobutler/porespy', 'size': '826'}