Merge pull request #291 from tonysyu/sphinx-import-warnings

DOC: Sphinx import warnings.
This commit is contained in:
Stefan van der Walt
2012-09-02 09:38:30 -07:00
3 changed files with 13 additions and 12 deletions
+4 -3
View File
@@ -221,8 +221,7 @@ latex_documents = [
# -----------------------------------------------------------------------------
# Numpy extensions
# -----------------------------------------------------------------------------
# Make numpydoc to generate plots for example sections
#numpydoc_use_plots = True
numpydoc_show_class_members = False
# -----------------------------------------------------------------------------
# Plots
@@ -257,7 +256,9 @@ plot2rst_index_name = 'README'
plot2rst_rcparams = {'image.cmap' : 'gray',
'image.interpolation' : 'none'}
# -----------------------------------------------------------------------------
# intersphinx
# -----------------------------------------------------------------------------
_python_doc_base = 'http://docs.python.org/2.7'
intersphinx_mapping = {
_python_doc_base: None,
+2 -2
View File
@@ -1,6 +1,6 @@
import numpy as np
import skimage
from skimage import img_as_float
from skimage.util.dtype import dtype_range
@@ -101,7 +101,7 @@ def equalize(image, nbins=256):
.. [2] http://en.wikipedia.org/wiki/Histogram_equalization
"""
image = skimage.img_as_float(image)
image = img_as_float(image)
cdf, bin_centers = cumulative_distribution(image, nbins)
out = np.interp(image.flat, bin_centers, cdf)
return out.reshape(image.shape)
+7 -7
View File
@@ -7,7 +7,7 @@ __docformat__ = 'restructuredtext en'
import warnings
import numpy as np
import skimage
from skimage import img_as_ubyte
from . import cmorph
@@ -63,8 +63,8 @@ def erosion(image, selem, out=None, shift_x=False, shift_y=False):
if image is out:
raise NotImplementedError("In-place erosion not supported!")
image = skimage.img_as_ubyte(image)
selem = skimage.img_as_ubyte(selem)
image = img_as_ubyte(image)
selem = img_as_ubyte(selem)
return cmorph.erode(image, selem, out=out,
shift_x=shift_x, shift_y=shift_y)
@@ -115,8 +115,8 @@ def dilation(image, selem, out=None, shift_x=False, shift_y=False):
if image is out:
raise NotImplementedError("In-place dilation not supported!")
image = skimage.img_as_ubyte(image)
selem = skimage.img_as_ubyte(selem)
image = img_as_ubyte(image)
selem = img_as_ubyte(selem)
return cmorph.dilate(image, selem, out=out,
shift_x=shift_x, shift_y=shift_y)
@@ -262,7 +262,7 @@ def white_tophat(image, selem, out=None):
"""
if image is out:
raise NotImplementedError("Cannot perform white top hat in place.")
image = skimage.img_as_ubyte(image)
image = img_as_ubyte(image)
out = opening(image, selem, out=out)
out = image - out
@@ -312,7 +312,7 @@ def black_tophat(image, selem, out=None):
if image is out:
raise NotImplementedError("Cannot perform white top hat in place.")
image = skimage.img_as_ubyte(image)
image = img_as_ubyte(image)
out = closing(image, selem, out=out)
out = out - image