Issue 1:
Couple of issues to investigate regarding the documentation on CircleCI:

The recently merged PR for OPTICS #12087 has an issue with an image which is not generated:

/home/circleci/project/doc/modules/clustering.rst:: WARNING: image file not readable: modules/../auto_examples/cluster/images/sphx_glr_plot_optics_001.png
/home/circleci/project/doc/modules/clustering.rst:: WARNING: image file not readable: modules/../auto_examples/cluster/images/sphx_glr_plot_optics_001.png

LaTeX Warning: File `{modules/../auto_examples/cluster/images/sphx_glr_plot_opt
ics_001}.png' not found on input line 2.

LaTeX Warning: File `{modules/../auto_examples/cluster/images/sphx_glr_plot_opt
ics_001}.png' not found on input line 2.

! Package pdftex.def Error: File `modules/../auto_examples/cluster/images/sphx_
glr_plot_optics_001.png' not found.

See the pdftex.def package documentation for explanation.
Type H <return> for immediate help.
...

l.25435 .../images/sphx_glr_plot_optics_001}.png}}
^^M
! ==> Fatal error occurred, no output PDF file produced!
Transcript written on user_guide.log.
Latexmk: Index file 'user_guide.idx' was written
Latexmk: Missing input file: '{modules/../auto_examples/cluster/images/sphx_glr_plot_optics_001}.png' from line
'LaTeX Warning: File `{modules/../auto_examples/cluster/images/sphx_glr_plot_optics_001}.png' not found on input line 2.'
Latexmk: Missing input file: '{modules/../auto_examples/cluster/images/sphx_glr_plot_optics_001}.png' from line
'LaTeX Warning: File `{modules/../auto_examples/cluster/images/sphx_glr_plot_optics_001}.png' not found on input line 2.'
Collected error summary (may duplicate other messages):
pdflatex: Command for 'pdflatex' gave return code 256
Latexmk: Use the -f option to force complete processing,
unless error was exceeding maximum runs of latex/pdflatex.
Latexmk: Errors, so I did not complete making targets
Makefile:33: recipe for target 'user_guide.pdf' failed
make[1]: *** [user_guide.pdf] Error 12
make[1]: Leaving directory '/home/circleci/project/doc/_build/latex'
Makefile:79: recipe for target 'latexpdf' failed
make: *** [latexpdf] Error 2
Exited with code 2

Something linked with a missing module:

WARNING: /home/circleci/project/doc/modules/generated/sklearn.utils.arrayfuncs.cholesky_delete.rst:6: (WARNING/2) autodoc: failed to import function 'cholesky_delete' from module 'arrayfuncs'; the following exception was raised:
Traceback (most recent call last):
File "/home/circleci/miniconda/envs/testenv/lib/python3.6/site-packages/Sphinx-1.6.2-py3.6.egg/sphinx/ext/autodoc.py", line 657, in import_object
__import__(self.modname)
ModuleNotFoundError: No module named 'arrayfuncs'

Issue 2:
Description

I've been working on #7301, and I found some seemingly duplicate logic in the decision tree code. At the least, it's something that requires more documentation; at the most, it's a bug.

So I was poking around, trying to figure out why I couldn't get equal trees for uniform sample weights when i set min_weight_fraction_leaf and min_samples_leaf to the same float value. I saw that the two built trees actually had radically different values of min_samples_split, despite me not setting this value at all. In the code (https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/tree/tree.py#L229), it shows that min_samples_split is set to the max(min_samples_split, 2 * min_samples_leaf). This isn't documented at all, and should be if we decide to keep this statement.

Now this logic makes sense to me, as you can't make a split if there's no way to split it in such a manner that each leaf has the minimum number of samples. However, isn't this sort of logic encapsulated when we're building the tree? Namely, I'm thinking of the is_leaf conditional, which determines whether to split on a node or not (https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/tree/_tree.pyx#L219):

is_leaf = ((depth >= max_depth) or
(n_node_samples < min_samples_split) or
(n_node_samples < 2 * min_samples_leaf) or
(weighted_n_node_samples < min_weight_leaf))

I think the statement (n_node_samples < 2 * min_samples_leaf) has the same effect as setting min_samples_split explicitly to the max of itself or 2*min_samples_leaf. Indeed, removing the max call does not cause any tests to fail.

Should we be removing the explicit call to max? It seems like a piece of duplicate logic, but maybe I'm missing something. ping @glouppe @raghavrv @jmschrei / anyone else.