Repository: scikit-image/scikit-image

Issue:
Building documentation fails
When building the documentation with the current development version, I get the following error:

```
# Sphinx version: 1.1.3
# Python version: 2.7.3
# Docutils version: 0.10 release
# Jinja2 version: 2.6
Traceback (most recent call last):
  File "/Users/hannes/.virtualenvs/skimage/lib/python2.7/site-packages/sphinx/cmdline.py", line 188, in main
    warningiserror, tags)
  File "/Users/hannes/.virtualenvs/skimage/lib/python2.7/site-packages/sphinx/application.py", line 134, in __init__
    self._init_builder(buildername)
  File "/Users/hannes/.virtualenvs/skimage/lib/python2.7/site-packages/sphinx/application.py", line 195, in _init_builder
    self.emit('builder-inited')
  File "/Users/hannes/.virtualenvs/skimage/lib/python2.7/site-packages/sphinx/application.py", line 314, in emit
    results.append(callback(self, *args))
  File "/Users/hannes/Development/scikit-image/doc/source/../ext/plot2rst.py", line 183, in generate_example_galleries
    generate_examples_and_gallery(example_dir, rst_dir, cfg)
  File "/Users/hannes/Development/scikit-image/doc/source/../ext/plot2rst.py", line 198, in generate_examples_and_gallery
    write_gallery(gallery_index, example_dir, rst_dir, cfg)
  File "/Users/hannes/Development/scikit-image/doc/source/../ext/plot2rst.py", line 250, in write_gallery
    write_example(src_name, src_dir, rst_dir, cfg)
  File "/Users/hannes/Development/scikit-image/doc/source/../ext/plot2rst.py", line 315, in write_example
    figure_list, rst = process_blocks(blocks, src_path, image_path, cfg)
  File "/Users/hannes/Development/scikit-image/doc/source/../ext/plot2rst.py", line 483, in process_blocks
    exec(bcontent, example_globals)
  File "<string>", line 59, in <module>
  File "<string>", line 21, in plot_img_and_hist
  File "/Users/hannes/.virtualenvs/skimage/lib/python2.7/site-packages/matplotlib/axes.py", line 7091, in imshow
    im.set_data(X)
  File "/Users/hannes/.virtualenvs/skimage/lib/python2.7/site-packages/matplotlib/image.py", line 418, in set_data
    raise TypeError("Image data can not convert to float")
TypeError: Image data can not convert to float
```



Discussion:

Resolving patch:
diff --git a/doc/examples/plot_equalize.py b/doc/examples/plot_equalize.py
--- a/doc/examples/plot_equalize.py
+++ b/doc/examples/plot_equalize.py
@@ -19,7 +19,6 @@
 """
 
 from skimage import data, img_as_float
-from skimage.util.dtype import dtype_range
 from skimage import exposure
 
 import matplotlib.pyplot as plt
diff --git a/doc/examples/plot_local_equalize.py b/doc/examples/plot_local_equalize.py
--- a/doc/examples/plot_local_equalize.py
+++ b/doc/examples/plot_local_equalize.py
@@ -57,7 +57,7 @@ def plot_img_and_hist(img, axes, bins=256):
 # Contrast stretching
 p2 = np.percentile(img, 2)
 p98 = np.percentile(img, 98)
-img_rescale = exposure.equalize(img)
+img_rescale = exposure.equalize_hist(img)
 
 # Equalization
 selem = disk(30)
diff --git a/skimage/exposure/exposure.py b/skimage/exposure/exposure.py
--- a/skimage/exposure/exposure.py
+++ b/skimage/exposure/exposure.py
@@ -81,7 +81,7 @@ def cumulative_distribution(image, nbins=256):
 
 @deprecated('equalize_hist')
 def equalize(image, nbins=256):
-    equalize_hist(image, nbins)
+    return equalize_hist(image, nbins)
 
 
 def equalize_hist(image, nbins=256):


Test patch: