Skip to content
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

Fix documentation of entropy function #3018

Merged
merged 1 commit into from May 4, 2014

Conversation

captainwhippet
Copy link
Contributor

Fix the documentation of the entropy function to correct the formula so
it reflects the calculation used in the code. Also mention the unit of
the value returned,

See also this stackoverflow question: Matplotlib mlab entropy calculation incorrect?

@tacaswell tacaswell added this to the v1.4.0 milestone Apr 28, 2014

.. math::

\sum p_i \log_2(p_i)
\sum p_i \log(p_i)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this needs a minus sign; and it would be clearer if you used "\ln" rather than "\log".

@efiring
Copy link
Member

efiring commented Apr 29, 2014

The Travis failure is unrelated.
For the sake of reducing clutter in the history, I would prefer to see the 2 commits squashed down to one and force-pushed.

Fix the documentation of the entropy function to correct the formula so
it reflects the calculation used in the code. Also mention the unit of
the value returned,
@captainwhippet
Copy link
Contributor Author

OK, I have figured out how to do that and it's done

efiring added a commit that referenced this pull request May 4, 2014
Fix documentation of entropy function
@efiring efiring merged commit ef462e4 into matplotlib:master May 4, 2014
@efiring
Copy link
Member

efiring commented May 4, 2014

Thank you.

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

Successfully merging this pull request may close these issues.

None yet

4 participants