prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  canny edge detection throws AttributeError exception
  I was trying out http://scikit-image.org/docs/dev/auto_examples/plot_canny.html 
  
  And the following lines of code:
  # Generate noisy image of a square
  
  im = np.zeros((128, 128))
  im[32:-32, 32:-32] = 1
  
  im = ndimage.rotate(im, 15, mode='constant')
  im = ndimage.gaussian_filter(im, 4)
  im += 0.2 \* np.random.random(im.shape)
  # Compute the Canny filter for two values of sigma
  
  edges1 = filter.canny(im)
  
   produced this:
  
  Traceback (most recent call last):
    File "<stdin>", line 2, in <module>
    File "/home/abc/virtualenvs/activepython/lib/python2.7/site-packages/scikit_image-0.11dev-py2.7-linux-x86_64.egg/skimage/_shared/utils.py", line 46, in __call__
      msg = 'Call to deprecated function `%s`.' % func.**name**
  AttributeError: 'numpy.ndarray' object has no attribute '**name**'
  
  Any guess? Seems I'm using the latest version of scikit-image. 
  
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `skimage/filter/__init__.py`
  Content:
  ```
  1 from .lpi_filter import inverse, wiener, LPIFilter2D
  2 from ._gaussian import gaussian_filter
  3 from .edges import (sobel, hsobel, vsobel, scharr, hscharr, vscharr, prewitt,
  4                     hprewitt, vprewitt, roberts, roberts_positive_diagonal,
  5                     roberts_negative_diagonal)
  6 from ._rank_order import rank_order
  7 from ._gabor import gabor_kernel, gabor_filter
  8 from .thresholding import (threshold_adaptive, threshold_otsu, threshold_yen,
  9                            threshold_isodata)
  10 from . import rank
  11 
  12 from skimage._shared.utils import deprecated
  13 from skimage import restoration
  14 denoise_bilateral = deprecated('skimage.restoration.denoise_bilateral')\
  15                         (restoration.denoise_bilateral)
  16 denoise_tv_bregman = deprecated('skimage.restoration.denoise_tv_bregman')\
  17                         (restoration.denoise_tv_bregman)
  18 denoise_tv_chambolle = deprecated('skimage.restoration.denoise_tv_chambolle')\
  19                         (restoration.denoise_tv_chambolle)
  20 
  21 # Backward compatibility v<0.11
  22 @deprecated
  23 def canny(*args, **kwargs):
  24     # Hack to avoid circular import
  25     from skimage.feature._canny import canny as canny_
  26     return canny_(*args, **kwargs)
  27 
  28 
  29 __all__ = ['inverse',
  30            'wiener',
  31            'LPIFilter2D',
  32            'gaussian_filter',
  33            'canny',
  34            'sobel',
  35            'hsobel',
  36            'vsobel',
  37            'scharr',
  38            'hscharr',
  39            'vscharr',
  40            'prewitt',
  41            'hprewitt',
  42            'vprewitt',
  43            'roberts',
  44            'roberts_positive_diagonal',
  45            'roberts_negative_diagonal',
  46            'denoise_tv_chambolle',
  47            'denoise_bilateral',
  48            'denoise_tv_bregman',
  49            'rank_order',
  50            'gabor_kernel',
  51            'gabor_filter',
  52            'threshold_adaptive',
  53            'threshold_otsu',
  54            'threshold_yen',
  55            'threshold_isodata',
  56            'rank']
  57
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/skimage/filter/__init__.py b/skimage/filter/__init__.py
  --- a/skimage/filter/__init__.py
  +++ b/skimage/filter/__init__.py
  @@ -19,7 +19,7 @@
                           (restoration.denoise_tv_chambolle)
   
   # Backward compatibility v<0.11
  -@deprecated
  +@deprecated('skimage.feature.canny')
   def canny(*args, **kwargs):
       # Hack to avoid circular import
       from skimage.feature._canny import canny as canny_
  
verification_info: {"golden_diff": "diff --git a/skimage/filter/__init__.py b/skimage/filter/__init__.py\n--- a/skimage/filter/__init__.py\n+++ b/skimage/filter/__init__.py\n@@ -19,7 +19,7 @@\n                         (restoration.denoise_tv_chambolle)\n \n # Backward compatibility v<0.11\n-@deprecated\n+@deprecated('skimage.feature.canny')\n def canny(*args, **kwargs):\n     # Hack to avoid circular import\n     from skimage.feature._canny import canny as canny_\n", "issue": "canny edge detection throws AttributeError exception\nI was trying out http://scikit-image.org/docs/dev/auto_examples/plot_canny.html \n\nAnd the following lines of code:\n# Generate noisy image of a square\n\nim = np.zeros((128, 128))\nim[32:-32, 32:-32] = 1\n\nim = ndimage.rotate(im, 15, mode='constant')\nim = ndimage.gaussian_filter(im, 4)\nim += 0.2 \\* np.random.random(im.shape)\n# Compute the Canny filter for two values of sigma\n\nedges1 = filter.canny(im)\n\n produced this:\n\nTraceback (most recent call last):\n  File \"<stdin>\", line 2, in <module>\n  File \"/home/abc/virtualenvs/activepython/lib/python2.7/site-packages/scikit_image-0.11dev-py2.7-linux-x86_64.egg/skimage/_shared/utils.py\", line 46, in __call__\n    msg = 'Call to deprecated function `%s`.' % func.**name**\nAttributeError: 'numpy.ndarray' object has no attribute '**name**'\n\nAny guess? Seems I'm using the latest version of scikit-image. \n\n", "before_files": [{"content": "from .lpi_filter import inverse, wiener, LPIFilter2D\nfrom ._gaussian import gaussian_filter\nfrom .edges import (sobel, hsobel, vsobel, scharr, hscharr, vscharr, prewitt,\n                    hprewitt, vprewitt, roberts, roberts_positive_diagonal,\n                    roberts_negative_diagonal)\nfrom ._rank_order import rank_order\nfrom ._gabor import gabor_kernel, gabor_filter\nfrom .thresholding import (threshold_adaptive, threshold_otsu, threshold_yen,\n                           threshold_isodata)\nfrom . import rank\n\nfrom skimage._shared.utils import deprecated\nfrom skimage import restoration\ndenoise_bilateral = deprecated('skimage.restoration.denoise_bilateral')\\\n                        (restoration.denoise_bilateral)\ndenoise_tv_bregman = deprecated('skimage.restoration.denoise_tv_bregman')\\\n                        (restoration.denoise_tv_bregman)\ndenoise_tv_chambolle = deprecated('skimage.restoration.denoise_tv_chambolle')\\\n                        (restoration.denoise_tv_chambolle)\n\n# Backward compatibility v<0.11\n@deprecated\ndef canny(*args, **kwargs):\n    # Hack to avoid circular import\n    from skimage.feature._canny import canny as canny_\n    return canny_(*args, **kwargs)\n\n\n__all__ = ['inverse',\n           'wiener',\n           'LPIFilter2D',\n           'gaussian_filter',\n           'canny',\n           'sobel',\n           'hsobel',\n           'vsobel',\n           'scharr',\n           'hscharr',\n           'vscharr',\n           'prewitt',\n           'hprewitt',\n           'vprewitt',\n           'roberts',\n           'roberts_positive_diagonal',\n           'roberts_negative_diagonal',\n           'denoise_tv_chambolle',\n           'denoise_bilateral',\n           'denoise_tv_bregman',\n           'rank_order',\n           'gabor_kernel',\n           'gabor_filter',\n           'threshold_adaptive',\n           'threshold_otsu',\n           'threshold_yen',\n           'threshold_isodata',\n           'rank']\n", "path": "skimage/filter/__init__.py"}], "after_files": [{"content": "from .lpi_filter import inverse, wiener, LPIFilter2D\nfrom ._gaussian import gaussian_filter\nfrom .edges import (sobel, hsobel, vsobel, scharr, hscharr, vscharr, prewitt,\n                    hprewitt, vprewitt, roberts, roberts_positive_diagonal,\n                    roberts_negative_diagonal)\nfrom ._rank_order import rank_order\nfrom ._gabor import gabor_kernel, gabor_filter\nfrom .thresholding import (threshold_adaptive, threshold_otsu, threshold_yen,\n                           threshold_isodata)\nfrom . import rank\n\nfrom skimage._shared.utils import deprecated\nfrom skimage import restoration\ndenoise_bilateral = deprecated('skimage.restoration.denoise_bilateral')\\\n                        (restoration.denoise_bilateral)\ndenoise_tv_bregman = deprecated('skimage.restoration.denoise_tv_bregman')\\\n                        (restoration.denoise_tv_bregman)\ndenoise_tv_chambolle = deprecated('skimage.restoration.denoise_tv_chambolle')\\\n                        (restoration.denoise_tv_chambolle)\n\n# Backward compatibility v<0.11\n@deprecated('skimage.feature.canny')\ndef canny(*args, **kwargs):\n    # Hack to avoid circular import\n    from skimage.feature._canny import canny as canny_\n    return canny_(*args, **kwargs)\n\n\n__all__ = ['inverse',\n           'wiener',\n           'LPIFilter2D',\n           'gaussian_filter',\n           'canny',\n           'sobel',\n           'hsobel',\n           'vsobel',\n           'scharr',\n           'hscharr',\n           'vscharr',\n           'prewitt',\n           'hprewitt',\n           'vprewitt',\n           'roberts',\n           'roberts_positive_diagonal',\n           'roberts_negative_diagonal',\n           'denoise_tv_chambolle',\n           'denoise_bilateral',\n           'denoise_tv_bregman',\n           'rank_order',\n           'gabor_kernel',\n           'gabor_filter',\n           'threshold_adaptive',\n           'threshold_otsu',\n           'threshold_yen',\n           'threshold_isodata',\n           'rank']\n", "path": "skimage/filter/__init__.py"}]}