diff --git a/doc/source/conf.py b/doc/source/conf.py index 0bc673e6..cb22e6f0 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -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, diff --git a/skimage/exposure/exposure.py b/skimage/exposure/exposure.py index b0ef45cf..bffe660a 100644 --- a/skimage/exposure/exposure.py +++ b/skimage/exposure/exposure.py @@ -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) diff --git a/skimage/morphology/grey.py b/skimage/morphology/grey.py index 5ef6b9af..dc34d3d6 100644 --- a/skimage/morphology/grey.py +++ b/skimage/morphology/grey.py @@ -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