Repository: scikit-image/scikit-image

Issue:
API: replace visualise by visualize in hog() to respect our recommendations 
Needs a deprecation cycle... See the documentation for that.

Fix the spelling in the documentation as well.


Discussion:
Sir I am new to open source community.How can I fix this issue.Please guide me.

Resolving patch:
diff --git a/doc/examples/features_detection/plot_hog.py b/doc/examples/features_detection/plot_hog.py
--- a/doc/examples/features_detection/plot_hog.py
+++ b/doc/examples/features_detection/plot_hog.py
@@ -88,7 +88,7 @@
 image = color.rgb2gray(data.astronaut())
 
 fd, hog_image = hog(image, orientations=8, pixels_per_cell=(16, 16),
-                    cells_per_block=(1, 1), visualise=True)
+                    cells_per_block=(1, 1), visualize=True)
 
 fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(8, 4), sharex=True, sharey=True)
 
diff --git a/skimage/feature/_hog.py b/skimage/feature/_hog.py
--- a/skimage/feature/_hog.py
+++ b/skimage/feature/_hog.py
@@ -23,7 +23,7 @@ def _hog_normalize_block(block, method, eps=1e-5):
 
 
 def hog(image, orientations=9, pixels_per_cell=(8, 8), cells_per_block=(3, 3),
-        block_norm='L1', visualise=False, transform_sqrt=False,
+        block_norm='L1', visualize=False, visualise=None, transform_sqrt=False,
         feature_vector=True):
     """Extract Histogram of Oriented Gradients (HOG) for a given image.
 
@@ -60,7 +60,7 @@ def hog(image, orientations=9, pixels_per_cell=(8, 8), cells_per_block=(3, 3),
            renormalization using L2-norm.
            For details, see [3]_, [4]_.
 
-    visualise : bool, optional
+    visualize : bool, optional
         Also return an image of the HOG.
     transform_sqrt : bool, optional
         Apply power law compression to normalize the image before
@@ -74,7 +74,7 @@ def hog(image, orientations=9, pixels_per_cell=(8, 8), cells_per_block=(3, 3),
     -------
     newarr : ndarray
         HOG for the image as a 1D (flattened) array.
-    hog_image : ndarray (if visualise=True)
+    hog_image : ndarray (if visualize=True)
         A visualisation of the HOG image.
 
     References
@@ -181,7 +181,11 @@ def hog(image, orientations=9, pixels_per_cell=(8, 8), cells_per_block=(3, 3),
     # now compute the histogram for each cell
     hog_image = None
 
-    if visualise:
+    if visualise is not None:
+        visualize = visualise
+        warn('Argument `visualise` is deprecated and will '
+             'be changed to `visualize` in v0.16', skimage_deprecation)
+    if visualize:
         from .. import draw
 
         radius = min(cx, cy) // 2 - 1
@@ -234,7 +238,7 @@ def hog(image, orientations=9, pixels_per_cell=(8, 8), cells_per_block=(3, 3),
     if feature_vector:
         normalized_blocks = normalized_blocks.ravel()
 
-    if visualise:
+    if visualize:
         return normalized_blocks, hog_image
     else:
         return normalized_blocks


Test patch:
diff --git a/skimage/feature/tests/test_hog.py b/skimage/feature/tests/test_hog.py
--- a/skimage/feature/tests/test_hog.py
+++ b/skimage/feature/tests/test_hog.py
@@ -27,7 +27,7 @@ def test_hog_output_correctness_l1_norm():
     output = feature.hog(img, orientations=9, pixels_per_cell=(8, 8),
                          cells_per_block=(3, 3), block_norm='L1',
                          feature_vector=True, transform_sqrt=False,
-                         visualise=False)
+                         visualize=False)
     assert_almost_equal(output, correct_output)
 
 
@@ -39,7 +39,7 @@ def test_hog_output_correctness_l2hys_norm():
     output = feature.hog(img, orientations=9, pixels_per_cell=(8, 8),
                          cells_per_block=(3, 3), block_norm='L2-Hys',
                          feature_vector=True, transform_sqrt=False,
-                         visualise=False)
+                         visualize=False)
     assert_almost_equal(output, correct_output)
 
 
@@ -82,16 +82,16 @@ def test_hog_basic_orientations_and_data_types():
 
         (hog_float, hog_img_float) = feature.hog(
             image_float, orientations=4, pixels_per_cell=(8, 8),
-            cells_per_block=(1, 1), visualise=True, transform_sqrt=False)
+            cells_per_block=(1, 1), visualize=True, transform_sqrt=False)
         (hog_uint8, hog_img_uint8) = feature.hog(
             image_uint8, orientations=4, pixels_per_cell=(8, 8),
-            cells_per_block=(1, 1), visualise=True, transform_sqrt=False)
+            cells_per_block=(1, 1), visualize=True, transform_sqrt=False)
         (hog_float_norm, hog_img_float_norm) = feature.hog(
             image_float, orientations=4, pixels_per_cell=(8, 8),
-            cells_per_block=(1, 1), visualise=True, transform_sqrt=True)
+            cells_per_block=(1, 1), visualize=True, transform_sqrt=True)
         (hog_uint8_norm, hog_img_uint8_norm) = feature.hog(
             image_uint8, orientations=4, pixels_per_cell=(8, 8),
-            cells_per_block=(1, 1), visualise=True, transform_sqrt=True)
+            cells_per_block=(1, 1), visualize=True, transform_sqrt=True)
 
         # set to True to enable manual debugging with graphical output,
         # must be False for automatic testing
@@ -169,7 +169,7 @@ def test_hog_orientations_circle():
     for orientations in range(2, 15):
         (hog, hog_img) = feature.hog(image, orientations=orientations,
                                      pixels_per_cell=(8, 8),
-                                     cells_per_block=(1, 1), visualise=True,
+                                     cells_per_block=(1, 1), visualize=True,
                                      transform_sqrt=False)
 
         # set to True to enable manual debugging with graphical output,