Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating training notebooks - peak_local_max function kwarg deprecated #6

Open
GenevieveBuckley opened this issue Jul 12, 2023 · 0 comments

Comments

@GenevieveBuckley
Copy link

Cell 20 in lesson notebook 02_interactive_analysis.ipynb needs updating to be compatible with the latest versions of scikit-image and numpy. I know this notebook was written several years ago, but it's a great example and I'd like to keep it useable for everyone.

It needs to be:

Now we can try and identify the centers of each of the nuclei by finding peaks of the distance transform

peaks = feature.peak_local_max(
    smoothed_distance,
    footprint=np.ones((7, 7), dtype=bool),
    labels=measure.label(foreground_processed)
)

There are two changes here:

  1. The indices keyword argument for peak_local_max has been deprecated. I have removed it. This also means the returned result is the peaks variable, not peaks_local_max as before.
  2. Dtypes of np.bool are deprecated, and it's advised to replace with bool instead. I've done that here.
adiezsanchez added a commit to adiezsanchez/napari-training-course that referenced this issue Aug 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant