Repository: scipy/scipy

Issue:
Missing documentation for `brute_force` parameter in scipy.ndimage.morphology
Documentation is missing for the `brute_force` parameter in the math morphology methods available in Scipy:
- [binary_dilation](https://docs.scipy.org/doc/scipy-0.14.0/reference/generated/scipy.ndimage.morphology.binary_dilation.html)
- [binary_erosion](https://docs.scipy.org/doc/scipy-0.14.0/reference/generated/scipy.ndimage.morphology.binary_erosion.html)

This includes the internal methods in the [morphology.py](https://github.com/scipy/scipy/blob/master/scipy/ndimage/morphology.py) file.

### Reproducing code example:
Not applicable.

### Error message:
Not applicable.

### Scipy/Numpy/Python version information:
```
1.0.0 1.14.0 sys.version_info(major=3, minor=6, micro=4, releaselevel='final', serial=0)
```

I've been looking at the code but could not find a feasible explanation for the parameter. **If you post here its meaning I can submit a PR to add the missing documentation.**


Discussion:
Seems to me like a flag to control the recursion but I don't know why it is exposed in the public API.
Both erosion and dilation can be run repeatedly until there is no change in the image. The default behaviour (`brute_force=False`) keeps track of what points changed in the last iteration, and chooses which pixels it should try to erode or dilate in some clever fashion based on that. If you set `brute_force=True`, it tries to erode or dilate every pixel of the image in every iteration, regardless of what happened in the previous one.
OK @jaimefrio . Thanks, I'll submit a PR with this, then we'll refine the docstring.
That'd be great!

Resolving patch:
diff --git a/scipy/ndimage/morphology.py b/scipy/ndimage/morphology.py
--- a/scipy/ndimage/morphology.py
+++ b/scipy/ndimage/morphology.py
@@ -309,10 +309,16 @@ def binary_erosion(input, structure=None, iterations=1, mask=None, output=None,
     output : ndarray, optional
         Array of the same shape as input, into which the output is placed.
         By default, a new array is created.
-    origin : int or tuple of ints, optional
-        Placement of the filter, by default 0.
     border_value : int (cast to 0 or 1), optional
         Value at the border in the output array.
+    origin : int or tuple of ints, optional
+        Placement of the filter, by default 0.
+    brute_force : boolean, optional
+        Memory condition: if False, only the pixels whose value was changed in
+        the last iteration are tracked as candidates to be updated (eroded) in
+        the current iteration; if True all pixels are considered as candidates
+        for erosion, regardless of what happened in the previous iteration.
+        False by default.
 
     Returns
     -------
@@ -398,10 +404,16 @@ def binary_dilation(input, structure=None, iterations=1, mask=None,
     output : ndarray, optional
         Array of the same shape as input, into which the output is placed.
         By default, a new array is created.
-    origin : int or tuple of ints, optional
-        Placement of the filter, by default 0.
     border_value : int (cast to 0 or 1), optional
         Value at the border in the output array.
+    origin : int or tuple of ints, optional
+        Placement of the filter, by default 0.
+    brute_force : boolean, optional
+        Memory condition: if False, only the pixels whose value was changed in
+        the last iteration are tracked as candidates to be updated (dilated)
+        in the current iteration; if True all pixels are considered as
+        candidates for dilation, regardless of what happened in the previous
+        iteration. False by default.
 
     Returns
     -------


Test patch: