diff --git a/skimage/_shared/testing.py b/skimage/_shared/testing.py index f8c7a88e..0cf65cb4 100644 --- a/skimage/_shared/testing.py +++ b/skimage/_shared/testing.py @@ -48,7 +48,7 @@ def doctest_skip_parser(func): >>> something + else >>> something # skip if HAVE_BMODULE - This decorator will evaluate the expresssion after ``skip if``. If this + This decorator will evaluate the expression after ``skip if``. If this evaluates to True, then the comment is replaced by ``# doctest: +SKIP``. If False, then the comment is just removed. The expression is evaluated in the ``globals`` scope of `func`. diff --git a/skimage/color/colorconv.py b/skimage/color/colorconv.py index 959fad3e..8e8c3b41 100644 --- a/skimage/color/colorconv.py +++ b/skimage/color/colorconv.py @@ -1350,7 +1350,7 @@ def lab2lch(lab): def _cart2polar_2pi(x, y): - """convert cartesian coordiantes to polar (uses non-standard theta range!) + """convert cartesian coordinates to polar (uses non-standard theta range!) NON-STANDARD RANGE! Maps to ``(0, 2*pi)`` rather than usual ``(-pi, +pi)`` """ diff --git a/skimage/feature/texture.py b/skimage/feature/texture.py index b1e1024a..45d97b97 100644 --- a/skimage/feature/texture.py +++ b/skimage/feature/texture.py @@ -11,7 +11,7 @@ def greycomatrix(image, distances, angles, levels=256, symmetric=False, normed=False): """Calculate the grey-level co-occurrence matrix. - A grey level co-occurence matrix is a histogram of co-occuring + A grey level co-occurrence matrix is a histogram of co-occurring greyscale values at a given offset over an image. Parameters diff --git a/skimage/filters/lpi_filter.py b/skimage/filters/lpi_filter.py index e160407a..36442eb9 100644 --- a/skimage/filters/lpi_filter.py +++ b/skimage/filters/lpi_filter.py @@ -213,7 +213,7 @@ def wiener(data, impulse_response=None, filter_params={}, K=0.25, data : (M,N) ndarray Input data. K : float or (M,N) ndarray - Ratio between power spectrum of noise and undegraded + Ratio between power spectrum of noise and undergraded image. impulse_response : callable `f(r, c, **filter_params)` Impulse response of the filter. See LPIFilter2D.__init__. diff --git a/skimage/graph/_ncut.py b/skimage/graph/_ncut.py index 2735bbd2..05be8cd1 100644 --- a/skimage/graph/_ncut.py +++ b/skimage/graph/_ncut.py @@ -20,7 +20,7 @@ def DW_matrices(graph): ------- D : csc_matrix The diagonal matrix of the graph. ``D[i, i]`` is the sum of weights of - all edges incident on `i`. All other enteries are `0`. + all edges incident on `i`. All other entries are `0`. W : csc_matrix The weight matrix of the graph. ``W[i, j]`` is the weight of the edge joining `i` to `j`. @@ -38,7 +38,7 @@ def ncut_cost(cut, D, W): Parameters ---------- cut : ndarray - The mask for the nodes in the graph. Nodes corressponding to a `True` + The mask for the nodes in the graph. Nodes corresponding to a `True` value are in one set. D : csc_matrix The diagonal matrix of the graph. diff --git a/skimage/graph/graph_cut.py b/skimage/graph/graph_cut.py index b14b6a34..b4658bd1 100644 --- a/skimage/graph/graph_cut.py +++ b/skimage/graph/graph_cut.py @@ -10,10 +10,10 @@ from scipy.sparse import linalg def cut_threshold(labels, rag, thresh, in_place=True): - """Combine regions seperated by weight less than threshold. + """Combine regions separated by weight less than threshold. Given an image's labels and its RAG, output new labels by - combining regions whose nodes are seperated by a weight less + combining regions whose nodes are separated by a weight less than the given threshold. Parameters @@ -228,7 +228,7 @@ def _ncut_relabel(rag, thresh, num_cuts): """Perform Normalized Graph cut on the Region Adjacency Graph. Recursively partition the graph into 2, until further subdivision - yields a cut greather than `thresh` or such a cut cannot be computed. + yields a cut greater than `thresh` or such a cut cannot be computed. For such a subgraph, indices to labels of all its nodes map to a single unique value. diff --git a/skimage/graph/heap.pyx b/skimage/graph/heap.pyx index dde8bd60..a4368595 100644 --- a/skimage/graph/heap.pyx +++ b/skimage/graph/heap.pyx @@ -711,7 +711,7 @@ cdef class FastUpdateBinaryHeap(BinaryHeap): Returns ------- pushed : bool - True if an append/update occured, False if otherwise. + True if an append/update occurred, False if otherwise. Raises ------ diff --git a/skimage/graph/rag.py b/skimage/graph/rag.py index 5950dfdc..5f148c5e 100644 --- a/skimage/graph/rag.py +++ b/skimage/graph/rag.py @@ -26,7 +26,7 @@ def min_weight(graph, src, dst, n): """Callback to handle merging nodes by choosing minimum weight. Returns either the weight between (`src`, `n`) or (`dst`, `n`) - in `graph` or the minumum of the two when both exist. + in `graph` or the minimum of the two when both exist. Parameters ---------- @@ -41,7 +41,7 @@ def min_weight(graph, src, dst, n): ------- weight : float The weight between (`src`, `n`) or (`dst`, `n`) in `graph` or the - minumum of the two when both exist. + minimum of the two when both exist. """ @@ -200,7 +200,7 @@ def rag_mean_color(image, labels, connectivity=2, mode='distance', """Compute the Region Adjacency Graph using mean colors. Given an image and its initial segmentation, this method constructs the - corresponsing Region Adjacency Graph (RAG). Each node in the RAG + corresponding Region Adjacency Graph (RAG). Each node in the RAG represents a set of pixels within `image` with the same label in `labels`. The weight between two adjacent regions represents how similar or dissimilar two regions are depending on the `mode` parameter. diff --git a/skimage/measure/_structural_similarity.py b/skimage/measure/_structural_similarity.py index 01e4e9eb..d3150667 100644 --- a/skimage/measure/_structural_similarity.py +++ b/skimage/measure/_structural_similarity.py @@ -29,7 +29,7 @@ def structural_similarity(X, Y, win_size=7, Returns ------- s : float - Strucutural similarity. + Structural similarity. grad : (N * N,) ndarray Gradient of the structural similarity index between X and Y. This is only returned if `gradient` is set to True. diff --git a/skimage/restoration/uft.py b/skimage/restoration/uft.py index 046c981c..dfece24f 100644 --- a/skimage/restoration/uft.py +++ b/skimage/restoration/uft.py @@ -10,7 +10,7 @@ frequency is equal to .. math:: \frac{1}{\sqrt{n}} \sum_i x_i -so the Fourier tranform has the same energy as the original image +so the Fourier transform has the same energy as the original image (see ``image_quad_norm`` function). The transform is applied from the last axis for performance (assuming a C-order array input). @@ -353,18 +353,18 @@ def ir2tf(imp_resp, shape, dim=None, is_real=True): The impulse responses. shape : tuple of int A tuple of integer corresponding to the target shape of the - tranfer function. + transfer function. dim : int, optional The last axis along which to compute the transform. All axes by default. - is_real : boolean (optionnal, default True) + is_real : boolean (optional, default True) If True, imp_resp is supposed real and the Hermitian property is used with rfftn Fourier transform. Returns ------- y : complex ndarray - The tranfer function of shape ``shape``. + The transfer function of shape ``shape``. See Also -------- @@ -382,7 +382,7 @@ def ir2tf(imp_resp, shape, dim=None, is_real=True): Notes ----- The input array can be composed of multiple-dimensional IR with - an arbitrary number of IR. The individual IR must be accesed + an arbitrary number of IR. The individual IR must be accessed through the first axes. The last ``dim`` axes contain the space definition. """ diff --git a/skimage/transform/finite_radon_transform.py b/skimage/transform/finite_radon_transform.py index dd3bad33..9d3780b1 100644 --- a/skimage/transform/finite_radon_transform.py +++ b/skimage/transform/finite_radon_transform.py @@ -29,7 +29,7 @@ def frt2(a): Notes ----- - The FRT has a unique inverse iff n is prime. [FRT] + The FRT has a unique inverse if n is prime. [FRT] The idea for this algorithm is due to Vlad Negnevitski. Examples @@ -88,7 +88,7 @@ def ifrt2(a): Notes ----- - The FRT has a unique inverse iff n is prime. + The FRT has a unique inverse if n is prime. See [1]_ for an overview. The idea for this algorithm is due to Vlad Negnevitski.