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

Update Compound.ipynb to use searchengine instead of mapr #125

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

will-moore
Copy link
Member

Copy link

Binder 👈 Launch a binder notebook on branch mapr_to_searchengine

@pwalczysko
Copy link
Contributor

Built locally. I have a problem with the first import block in the Compounds... notebook.

AttributeError                            Traceback (most recent call last)
Cell In[2], line 8
      6 import scipy
      7 import numpy
----> 8 from skimage import filters
      9 import matplotlib.pyplot as plt
     10 from idr import connection

File ~/opt/anaconda3/envs/idr_env/lib/python3.9/site-packages/skimage/filters/__init__.py:18
     11 from ._gabor import gabor_kernel, gabor
     12 from .thresholding import (threshold_local, threshold_otsu, threshold_yen,
     13                            threshold_isodata, threshold_li, threshold_minimum,
     14                            threshold_mean, threshold_triangle,
     15                            threshold_niblack, threshold_sauvola,
     16                            threshold_multiotsu, try_all_threshold,
     17                            apply_hysteresis_threshold)
---> 18 from .ridges import (meijering, sato, frangi, hessian)
     19 from . import rank
     20 from ._median import median

File ~/opt/anaconda3/envs/idr_env/lib/python3.9/site-packages/skimage/filters/ridges.py:18
     16 from ..util import img_as_float, invert
     17 from .._shared.utils import check_nD
---> 18 from ..feature.corner import hessian_matrix, hessian_matrix_eigvals
     21 def _divide_nonzero(array1, array2, cval=1e-10):
     22     """
     23     Divides two arrays.
     24 
   (...)
     40         Quotient of the array division.
     41     """

File ~/opt/anaconda3/envs/idr_env/lib/python3.9/site-packages/skimage/feature/__init__.py:22
     20 from .template import match_template
     21 from .brief import BRIEF
---> 22 from .censure import CENSURE
     23 from .orb import ORB
     24 from .match import match_descriptors

File ~/opt/anaconda3/envs/idr_env/lib/python3.9/site-packages/skimage/feature/censure.py:6
      4 from ..transform import integral_image
      5 from ..feature import structure_tensor
----> 6 from ..morphology import octagon, star
      7 from ..feature.censure_cy import _censure_dob_loop
      8 from ..feature.util import (FeatureDetector, _prepare_grayscale_input_2D,
      9                             _mask_border_keypoints)

File ~/opt/anaconda3/envs/idr_env/lib/python3.9/site-packages/skimage/morphology/__init__.py:8
      5 from .selem import (square, rectangle, diamond, disk, cube, octahedron, ball,
      6                     octagon, star)
      7 from ..measure._label import label
----> 8 from ._skeletonize import skeletonize, medial_axis, thin, skeletonize_3d
      9 from .convex_hull import convex_hull_image, convex_hull_object
     10 from .greyreconstruct import reconstruction

File ~/opt/anaconda3/envs/idr_env/lib/python3.9/site-packages/skimage/morphology/_skeletonize.py:241
    223     g123p_lut = g12_lut & g3p_lut
    225     return g123_lut, g123p_lut
    228 G123_LUT = np.array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,
    229                      0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0,
    230                      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1,
    231                      0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    232                      0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1,
    233                      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0,
    234                      0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0,
    235                      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    236                      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    237                      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    238                      0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
    239                      1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0,
    240                      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0,
--> 241                      0, 1, 1, 0, 0, 1, 0, 0, 0], dtype=np.bool)
    243 G123P_LUT = np.array([0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0,
    244                       0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0,
    245                       0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
   (...)
    255                       0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    256                       0, 0, 0, 0, 0, 0, 0, 0, 0], dtype=np.bool)
    259 def thin(image, max_iter=None):

File ~/opt/anaconda3/envs/idr_env/lib/python3.9/site-packages/numpy/__init__.py:324, in __getattr__(attr)
    319     warnings.warn(
    320         f"In the future `np.{attr}` will be defined as the "
    321         "corresponding NumPy scalar.", FutureWarning, stacklevel=2)
    323 if attr in __former_attrs__:
--> 324     raise AttributeError(__former_attrs__[attr])
    326 if attr == 'testing':
    327     import numpy.testing as testing

AttributeError: module 'numpy' has no attribute 'bool'.
`np.bool` was a deprecated alias for the builtin `bool`. To avoid this error in existing code, use `bool` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.bool_` here.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
    https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations

This was referenced Nov 19, 2024
@pwalczysko
Copy link
Contributor

I think I fixed the above problem #125 (comment) in will-moore#1.

@pwalczysko
Copy link
Contributor

pwalczysko commented Nov 19, 2024

I think I fixed the above problem #125 (comment) in will-moore#1.

@will-moore came up with better solution which I am adding in will-moore@0b4660a and will-moore@599dbb5

@@ -6,8 +6,8 @@ channels:
dependencies:
- pip
- idr-py
- scikit-image=0.17.*
- scikit-learn=0.23.*
- scikit-image
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should pin to a newer version otherwise this could lead to some unexpected failure

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

Successfully merging this pull request may close these issues.

3 participants