ward_tree returns heights (distances) between the clusters
both for the structured and unstructured version. Useful for
plotting the dendrogram with scipy.
ENH: `ward_tree` returns distances

Returns distances for both structured and unstructured version,
and they are equal for both versions.

Added test under test_hierarchical.
changed xrange to range for compatibility with Python 3
TST, test ward_tree_distance on known dataset

- Solve PEP8 problems in test_ward_tree_distance and ward_tree
- Refactor return_height into return_distance for ward_tree.
- Test that structured and unstructured versions of ward_tree return the
  same distances on a known dataset.
- structured and unstructured versions return children with the same
  order
FIX: structured and unstructured ward_tree return children sorted in the
same way

Add test
Clean code for test_ward_tree_distance
Cosmetic change in test_hierarchical, better documentation
Add ENH description in whats_new.rst
Add better description of distances, cosmetic changes
Fix git rebase problems
Add forgotten IFs
Clean code
Clean code
Merge pull request #3158 from mvdoc/clustering

[ENH] ward_tree: return distances
Fix typo
Merge pull request #3979 from lmichelbacher/patch-1

Fix typo
COSMIT pep8 fixes to sklearn/tests
ENH: Implemented LSH forest
TST tests for LSHForest
ENH Added radius_neighbors method to LSHForest.
MAINT refactor LSH forest code

Removed _do_hash function.
The functionality of _do_hash is done within the _create_tree function as
a hashing function is generated for each tree and it doesn't need a separate
function.

Added _convert_to_hash function.
This will be used in the queries and insertions to convert the data point
into the integer represented by the binary hash.

Updated _generate_masks to work with cached hashes.

Changed the insert function to accpet a batch of data points(a 2D array).
Now trees and original indices are stored in lists. Tests for insert and fit
functions have been updated.

Changed safe_asarray to check_arrary.