Skip to content

Conversation

oscarbenjamin
Copy link
Collaborator

References to other Issues or PRs

Brief description of what is fixed or changed

Add a top-level all_roots function that calls the Poly.all_roots method by analogy with real_roots and other poly functions.

Also add explanation in the docstrings of all_roots and real_roots about what they can and cannot do and when to use other functions instead.

Other comments

Release Notes

  • polys
    • A top-level function all_roots is added as a shorthand for calling the Poly.all_roots method.

@sympy-bot
Copy link

sympy-bot commented Jul 6, 2023

Hi, I am the SymPy bot (v170). I'm here to help you write a release notes entry. Please read the guide on how to write release notes.

Your release notes are in good order.

Here is what the release notes will look like:

  • polys
    • A top-level function all_roots is added as a shorthand for calling the Poly.all_roots method. (#25330 by @oscarbenjamin)

This will be added to https://github.com/sympy/sympy/wiki/Release-Notes-for-1.13.

Click here to see the pull request description that was parsed.
<!-- Your title above should be a short description of what
was changed. Do not include the issue number in the title. -->

#### References to other Issues or PRs
<!-- If this pull request fixes an issue, write "Fixes #NNNN" in that exact
format, e.g. "Fixes #1234" (see
https://tinyurl.com/auto-closing for more information). Also, please
write a comment on that issue linking back to this pull request once it is
open. -->

#### Brief description of what is fixed or changed

Add a top-level `all_roots` function that calls the `Poly.all_roots` method by analogy with `real_roots` and other poly functions.

Also add explanation in the docstrings of `all_roots` and `real_roots` about what they can and cannot do and when to use other functions instead.

#### Other comments


#### Release Notes

<!-- Write the release notes for this release below between the BEGIN and END
statements. The basic format is a bulleted list with the name of the subpackage
and the release note for this PR. For example:

* solvers
  * Added a new solver for logarithmic equations.

* functions
  * Fixed a bug with log of integers. Formerly, `log(-x)` incorrectly gave `-log(x)`.

* physics.units
  * Corrected a semantical error in the conversion between volt and statvolt which
    reported the volt as being larger than the statvolt.

or if no release note(s) should be included use:

NO ENTRY

See https://github.com/sympy/sympy/wiki/Writing-Release-Notes for more
information on how to write release notes. The bot will check your release
notes automatically to see if they are formatted correctly. -->

<!-- BEGIN RELEASE NOTES -->
* polys
    * A top-level function `all_roots` is added as a shorthand for calling the `Poly.all_roots` method.
<!-- END RELEASE NOTES -->

Update

The release notes on the wiki have been updated.

@oscarbenjamin oscarbenjamin force-pushed the pr_all_roots branch 2 times, most recently from 5d54046 to 3cacc44 Compare July 6, 2023 21:17
@github-actions
Copy link

github-actions bot commented Jul 6, 2023

Benchmark results from GitHub Actions

Lower numbers are good, higher numbers are bad. A ratio less than 1
means a speed up and greater than 1 means a slowdown. Green lines
beginning with + are slowdowns (the PR is slower then master or
master is slower than the previous release). Red lines beginning
with - are speedups.

Significantly changed benchmark results (PR vs master)

Significantly changed benchmark results (master vs previous release)

       before           after         ratio
     [8059df73]       [76de4896]
     <sympy-1.12^0>                 
-      87.3±0.9ms       56.5±0.7ms     0.65  integrate.TimeIntegrationRisch02.time_doit(10)
-      88.0±0.9ms       55.3±0.4ms     0.63  integrate.TimeIntegrationRisch02.time_doit_risch(10)

Full benchmark results can be found as artifacts in GitHub Actions
(click on checks at the top of the PR).

@smichr
Copy link
Member

smichr commented Jul 7, 2023

I think this is a nice addition.

@smichr smichr merged commit e27ef41 into sympy:master Jul 7, 2023
@oscarbenjamin
Copy link
Collaborator Author

Thanks!

@oscarbenjamin oscarbenjamin deleted the pr_all_roots branch July 7, 2023 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants