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

[Term Entry] Python scipy integrate odeint #5910

Open
wants to merge 17 commits into
base: main
Choose a base branch
from

Conversation

virachai
Copy link

@virachai virachai commented Jan 2, 2025

Description

This PR adds a detailed explanation of the odeint() function from SciPy's integrate module, which is used to solve ordinary differential equations (ODEs) using the LSODA method. The content covers the function's syntax, parameters, and return values, along with a practical example solving a simple first-order ODE. It also includes a visualization of the solution using Matplotlib to help users better understand the concept.

Issue Solved

Closes #5851

Type of Change

  • Adding a new entry

Checklist

  • All writings are my own.
  • My entry follows the Codecademy Docs style guide.
  • My changes generate no new warnings.
  • I have performed a self-review of my own writing and code.
  • I have checked my entry and corrected any misspellings.
  • I have made corresponding changes to the documentation if needed.
  • I have confirmed my changes are not being pushed from my forked main branch.
  • I have confirmed that I'm pushing from a new branch named after the changes I'm making.
  • I have linked any issues that are relevant to this PR in the Issues Solved section.

@CLAassistant
Copy link

CLAassistant commented Jan 2, 2025

CLA assistant check
All committers have signed the CLA.

@mamtawardhani mamtawardhani self-assigned this Jan 2, 2025
@mamtawardhani mamtawardhani added new entry New entry or entries status: under review Issue or PR is currently being reviewed scipy Python scipy enteries labels Jan 2, 2025
@virachai virachai marked this pull request as draft January 4, 2025 02:03
@virachai virachai marked this pull request as ready for review January 4, 2025 02:03
@virachai virachai changed the title Python scipy integrate odeint [Term Entry] Python scipy integrate odeint Jan 4, 2025
Copy link
Collaborator

@mamtawardhani mamtawardhani left a comment

Choose a reason for hiding this comment

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

Hey @virachai , thank you for contributing to Codecademy Docs, the entry is nicely written! 😄

I've suggested a few changes, could you please review and modify those at your earliest convenience? Thank you! 😃

virachai and others added 7 commits January 7, 2025 07:35
Refined the description of the .odeint() function to emphasize its role in solving ordinary differential equations using the LSODA method. The updated description highlights its capability to automatically handle both stiff and non-stiff problems. A big thank you to @mamtawardhani for the valuable suggestions!

Co-authored-by: Mamta Wardhani <[email protected]>
Included a hyperlink in the description of the .odeint() function to provide direct access to the SciPy integrate module documentation. This update improves the usability of the documentation. A big thank you to @mamtawardhani for the valuable suggestion!

Co-authored-by: Mamta Wardhani <[email protected]>
Changed the code block language from python to pseudo in the .odeint() function documentation to accurately reflect the content. Thank you so much to @mamtawardhani for the helpful suggestion!

Co-authored-by: Mamta Wardhani <[email protected]>
Improved the parameter descriptions for the .odeint() function documentation by adding detailed explanations and clarifications. This update enhances the overall clarity and usability of the documentation. Thank you so much to @mamtawardhani for the insightful suggestions!

Co-authored-by: Mamta Wardhani <[email protected]>
Updated the return description for the .odeint() function documentation to specify that it returns a 2D NumPy array, with each row corresponding to the solution at a specific time point in t. Thanks to @mamtawardhani for the helpful suggestion!

Co-authored-by: Mamta Wardhani <[email protected]>
Modified the plotting code in the .odeint() function documentation to correctly index the solution array and retrieve the actual y values. A big thank you to @mamtawardhani for the valuable suggestion!

Co-authored-by: Mamta Wardhani <[email protected]>
Changed the code block language from python to py in the .odeint() function documentation for improved readability and consistency. Many thanks to @mamtawardhani for the suggestion!

Co-authored-by: Mamta Wardhani <[email protected]>
@virachai
Copy link
Author

virachai commented Jan 7, 2025

Hey @virachai , thank you for contributing to Codecademy Docs, the entry is nicely written! 😄

I've suggested a few changes, could you please review and modify those at your earliest convenience? Thank you! 😃

Thank you for your suggestions! I've reviewed your changes and will make the necessary modifications as soon as possible.

@mamtawardhani
Copy link
Collaborator

Hey @virachai , thank you for contributing to Codecademy Docs, the entry is nicely written! 😄
I've suggested a few changes, could you please review and modify those at your earliest convenience? Thank you! 😃

Thank you for your suggestions! I've reviewed your changes and will make the necessary modifications as soon as possible.

Please do tag me when you make the changes 😄

virachai

This comment was marked as off-topic.

Added a brief explanation of the code and the usage of odeint, emphasizing its role in solving differential equations numerically. Included an output visualization as an image stored under the media folder in the docs directory for better understanding.
@virachai
Copy link
Author

virachai commented Jan 8, 2025

@mamtawardhani I've made the changes based on your comments.

odeint_solution_plot png

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.

[Term Entry] Python:SciPy scipy.integrate: odeint()
3 participants