Skip to content

Type Error in linear_discriminant_analysis.py #1601

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
miladsade96 opened this issue Nov 28, 2019 · 4 comments · Fixed by #1602
Closed

Type Error in linear_discriminant_analysis.py #1601

miladsade96 opened this issue Nov 28, 2019 · 4 comments · Fixed by #1602

Comments

@miladsade96
Copy link
Contributor

There is a type error in this following code:
pre_indexes = predict_y_values(x, actual_means, variance, probabilities)
the 'probabilities' parameter must be a list object , but is a generator object.
generated error is as follows:
TypeError: 'generator' object is not subscriptable

@cclauss
Copy link
Member

cclauss commented Nov 28, 2019

My bad. Sorry about that.

@miladsade96
Copy link
Contributor Author

no problem
@cclauss

@cclauss
Copy link
Member

cclauss commented Nov 28, 2019

Now you know why I love to see doctests. It would be great to see linear_discriminant_analysis.py in our test list https://travis-ci.com/TheAlgorithms/Python/builds/138595890#L429

@miladsade96
Copy link
Contributor Author

@cclauss , I will do it as soon as possible

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants