Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
make_circles always generates an even number of samples #10037
Steps/Code to Reproduce
from sklearn.datasets import make_circles n_samples = 101 xs, ls = make_circles(n_samples=n_samples) assert(len(xs)==len(ls)==n_samples)
No Assertion Error should be thrown (in the example) OR the amount of data points generated should match the value supplied to the function OR a warning should be given.
Possible fix: Calculate the number of data points per cluster as in
Assertion Error, No warning, lower number of points returned than asked for.
pushed a commit
Oct 29, 2017
Thanks for opening the issue. I can confirm this. Also
A pull request to fix this issue (and add some unit tests) would be welcome..