From 82578234b570ba741ccdfb8c09612b18a9ed7d92 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Fri, 12 Sep 2014 06:14:45 -0500 Subject: [PATCH 1/3] Fix swirl docstring to use (row, column) nomenclature --- skimage/transform/_warps.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/skimage/transform/_warps.py b/skimage/transform/_warps.py index 23b56164..720b3a24 100644 --- a/skimage/transform/_warps.py +++ b/skimage/transform/_warps.py @@ -294,7 +294,7 @@ def swirl(image, center=None, strength=1, radius=100, rotation=0, ---------- image : ndarray Input image. - center : (x,y) tuple or (2,) ndarray, optional + center : (row, column) tuple or (2,) ndarray, optional Center coordinate of transformation. strength : float, optional The amount of swirling applied. From 02a6e210ea9858ebc4c74a008324a2a775dc9d43 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Fri, 12 Sep 2014 06:15:28 -0500 Subject: [PATCH 2/3] Remove extra space --- skimage/transform/_warps.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/skimage/transform/_warps.py b/skimage/transform/_warps.py index 720b3a24..27c92ff7 100644 --- a/skimage/transform/_warps.py +++ b/skimage/transform/_warps.py @@ -294,7 +294,7 @@ def swirl(image, center=None, strength=1, radius=100, rotation=0, ---------- image : ndarray Input image. - center : (row, column) tuple or (2,) ndarray, optional + center : (row, column) tuple or (2,) ndarray, optional Center coordinate of transformation. strength : float, optional The amount of swirling applied. From c85e08b0edabe3bb4650a4643472187291936038 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Mon, 15 Sep 2014 05:58:00 -0500 Subject: [PATCH 3/3] Rename (x, y) -> (row, col) in _geometric.py. --- skimage/transform/_geometric.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/skimage/transform/_geometric.py b/skimage/transform/_geometric.py index b3019135..bd93e959 100644 --- a/skimage/transform/_geometric.py +++ b/skimage/transform/_geometric.py @@ -919,7 +919,7 @@ def warp_coords(coord_map, shape, dtype=np.float64): coord_map : callable like GeometricTransform.inverse Return input coordinates for given output coordinates. Coordinates are in the shape (P, 2), where P is the number - of coordinates and each element is a ``(x, y)`` pair. + of coordinates and each element is a ``(row, col)`` pair. shape : tuple Shape of output image ``(rows, cols[, bands])``. dtype : np.dtype or string @@ -966,10 +966,10 @@ def warp_coords(coord_map, shape, dtype=np.float64): coords_shape.append(shape[2]) coords = np.empty(coords_shape, dtype=dtype) - # Reshape grid coordinates into a (P, 2) array of (x, y) pairs + # Reshape grid coordinates into a (P, 2) array of (row, col) pairs tf_coords = np.indices((cols, rows), dtype=dtype).reshape(2, -1).T - # Map each (x, y) pair to the source image according to + # Map each (row, col) pair to the source image according to # the user-provided mapping tf_coords = coord_map(tf_coords) @@ -998,7 +998,7 @@ def warp(image, inverse_map=None, map_args={}, output_shape=None, order=1, Input image. inverse_map : transformation object, callable ``xy = f(xy, **kwargs)``, (3, 3) array Inverse coordinate map. A function that transforms a (N, 2) array of - ``(x, y)`` coordinates in the *output image* into their corresponding + ``(row, col)`` coordinates in the *output image* into their corresponding coordinates in the *source image* (e.g. a transformation object or its inverse). See example section for usage. map_args : dict, optional