ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sun, 24 Jul 2022 22:05:05 +0200What is the best way to create a library on top of Sage?https://ask.sagemath.org/question/63348/what-is-the-best-way-to-create-a-library-on-top-of-sage/I am interested in using Sage to create a library for control theory (similar to SymPy and Python Control) below:
https://docs.sympy.org/latest/modules/physics/control/control.html
https://github.com/python-control/python-control
These libraries are great, but I want a library that has symbolic and numeric functionality. Therefore, I am considering using Sage to write the symbolic end and tie that with Python Control for the numeric end.
What is a good way to start creating this so that it can hopefully be integrated into the Sage build sometime in the future?
I came across someone with a similar idea before. They were using Sage to create a library for mechanics. The code is below. I notice that use a `cas_utils.sage` to hold their library. Then in notebooks like `061-Lagrange_bead_rotating_circle.ipynb`, they load this library to use the features. Is this a good way to approach making a rough library based on Sage?
https://github.com/marcinofulus/Mechanics_with_SageMathThu, 21 Jul 2022 20:08:22 +0200https://ask.sagemath.org/question/63348/what-is-the-best-way-to-create-a-library-on-top-of-sage/Comment by Pickle for <p>I am interested in using Sage to create a library for control theory (similar to SymPy and Python Control) below:
<a href="https://docs.sympy.org/latest/modules/physics/control/control.html">https://docs.sympy.org/latest/modules...</a></p>
<p><a href="https://github.com/python-control/python-control">https://github.com/python-control/pyt...</a></p>
<p>These libraries are great, but I want a library that has symbolic and numeric functionality. Therefore, I am considering using Sage to write the symbolic end and tie that with Python Control for the numeric end.</p>
<p>What is a good way to start creating this so that it can hopefully be integrated into the Sage build sometime in the future?</p>
<p>I came across someone with a similar idea before. They were using Sage to create a library for mechanics. The code is below. I notice that use a <code>cas_utils.sage</code> to hold their library. Then in notebooks like <code>061-Lagrange_bead_rotating_circle.ipynb</code>, they load this library to use the features. Is this a good way to approach making a rough library based on Sage?</p>
<p><a href="https://github.com/marcinofulus/Mechanics_with_SageMath">https://github.com/marcinofulus/Mecha...</a></p>
https://ask.sagemath.org/question/63348/what-is-the-best-way-to-create-a-library-on-top-of-sage/?comment=63394#post-id-63394I will do that! Thanks for the encouragementSun, 24 Jul 2022 22:05:05 +0200https://ask.sagemath.org/question/63348/what-is-the-best-way-to-create-a-library-on-top-of-sage/?comment=63394#post-id-63394Comment by John Palmieri for <p>I am interested in using Sage to create a library for control theory (similar to SymPy and Python Control) below:
<a href="https://docs.sympy.org/latest/modules/physics/control/control.html">https://docs.sympy.org/latest/modules...</a></p>
<p><a href="https://github.com/python-control/python-control">https://github.com/python-control/pyt...</a></p>
<p>These libraries are great, but I want a library that has symbolic and numeric functionality. Therefore, I am considering using Sage to write the symbolic end and tie that with Python Control for the numeric end.</p>
<p>What is a good way to start creating this so that it can hopefully be integrated into the Sage build sometime in the future?</p>
<p>I came across someone with a similar idea before. They were using Sage to create a library for mechanics. The code is below. I notice that use a <code>cas_utils.sage</code> to hold their library. Then in notebooks like <code>061-Lagrange_bead_rotating_circle.ipynb</code>, they load this library to use the features. Is this a good way to approach making a rough library based on Sage?</p>
<p><a href="https://github.com/marcinofulus/Mechanics_with_SageMath">https://github.com/marcinofulus/Mecha...</a></p>
https://ask.sagemath.org/question/63348/what-is-the-best-way-to-create-a-library-on-top-of-sage/?comment=63370#post-id-63370I think that you should just start writing code and using it. Writing a library for addition to Sage will likely take many iterations, so don't even try to get it right the first time: get something that works, then improve it, then think about it some more and see if it needs to be reorganized or optimized or modified in some other way, then work on it some more, etc. The more you and others use it, the more feedback you'll get. For example, https://trac.sagemath.org/ticket/30680 proposed a new addition to the Sage library, but almost everything got rewritten between the original proposal and merging the new stuff. There were also probably lots of revisions before it even got to the stage of being an actual proposal.Sat, 23 Jul 2022 20:28:51 +0200https://ask.sagemath.org/question/63348/what-is-the-best-way-to-create-a-library-on-top-of-sage/?comment=63370#post-id-63370Comment by Pickle for <p>I am interested in using Sage to create a library for control theory (similar to SymPy and Python Control) below:
<a href="https://docs.sympy.org/latest/modules/physics/control/control.html">https://docs.sympy.org/latest/modules...</a></p>
<p><a href="https://github.com/python-control/python-control">https://github.com/python-control/pyt...</a></p>
<p>These libraries are great, but I want a library that has symbolic and numeric functionality. Therefore, I am considering using Sage to write the symbolic end and tie that with Python Control for the numeric end.</p>
<p>What is a good way to start creating this so that it can hopefully be integrated into the Sage build sometime in the future?</p>
<p>I came across someone with a similar idea before. They were using Sage to create a library for mechanics. The code is below. I notice that use a <code>cas_utils.sage</code> to hold their library. Then in notebooks like <code>061-Lagrange_bead_rotating_circle.ipynb</code>, they load this library to use the features. Is this a good way to approach making a rough library based on Sage?</p>
<p><a href="https://github.com/marcinofulus/Mechanics_with_SageMath">https://github.com/marcinofulus/Mecha...</a></p>
https://ask.sagemath.org/question/63348/what-is-the-best-way-to-create-a-library-on-top-of-sage/?comment=63352#post-id-63352Hi John,
Thanks for the response. I have browsed a bit through the developers guide. One thing I struggle with is knowing where to start.
There is a lot of good stuff in that guide, but as a new developer I am not sure where to start. So any direction is appreciated to make some basic code.Fri, 22 Jul 2022 13:13:12 +0200https://ask.sagemath.org/question/63348/what-is-the-best-way-to-create-a-library-on-top-of-sage/?comment=63352#post-id-63352Comment by John Palmieri for <p>I am interested in using Sage to create a library for control theory (similar to SymPy and Python Control) below:
<a href="https://docs.sympy.org/latest/modules/physics/control/control.html">https://docs.sympy.org/latest/modules...</a></p>
<p><a href="https://github.com/python-control/python-control">https://github.com/python-control/pyt...</a></p>
<p>These libraries are great, but I want a library that has symbolic and numeric functionality. Therefore, I am considering using Sage to write the symbolic end and tie that with Python Control for the numeric end.</p>
<p>What is a good way to start creating this so that it can hopefully be integrated into the Sage build sometime in the future?</p>
<p>I came across someone with a similar idea before. They were using Sage to create a library for mechanics. The code is below. I notice that use a <code>cas_utils.sage</code> to hold their library. Then in notebooks like <code>061-Lagrange_bead_rotating_circle.ipynb</code>, they load this library to use the features. Is this a good way to approach making a rough library based on Sage?</p>
<p><a href="https://github.com/marcinofulus/Mechanics_with_SageMath">https://github.com/marcinofulus/Mecha...</a></p>
https://ask.sagemath.org/question/63348/what-is-the-best-way-to-create-a-library-on-top-of-sage/?comment=63351#post-id-63351There is a lot of information in the Sage Developer's Guide: https://doc.sagemath.org/html/en/developer/.Fri, 22 Jul 2022 01:15:17 +0200https://ask.sagemath.org/question/63348/what-is-the-best-way-to-create-a-library-on-top-of-sage/?comment=63351#post-id-63351Answer by Pickle for <p>I am interested in using Sage to create a library for control theory (similar to SymPy and Python Control) below:
<a href="https://docs.sympy.org/latest/modules/physics/control/control.html">https://docs.sympy.org/latest/modules...</a></p>
<p><a href="https://github.com/python-control/python-control">https://github.com/python-control/pyt...</a></p>
<p>These libraries are great, but I want a library that has symbolic and numeric functionality. Therefore, I am considering using Sage to write the symbolic end and tie that with Python Control for the numeric end.</p>
<p>What is a good way to start creating this so that it can hopefully be integrated into the Sage build sometime in the future?</p>
<p>I came across someone with a similar idea before. They were using Sage to create a library for mechanics. The code is below. I notice that use a <code>cas_utils.sage</code> to hold their library. Then in notebooks like <code>061-Lagrange_bead_rotating_circle.ipynb</code>, they load this library to use the features. Is this a good way to approach making a rough library based on Sage?</p>
<p><a href="https://github.com/marcinofulus/Mechanics_with_SageMath">https://github.com/marcinofulus/Mecha...</a></p>
https://ask.sagemath.org/question/63348/what-is-the-best-way-to-create-a-library-on-top-of-sage/?answer=63393#post-id-63393The comments from John are sufficient to answer this question Sun, 24 Jul 2022 22:04:34 +0200https://ask.sagemath.org/question/63348/what-is-the-best-way-to-create-a-library-on-top-of-sage/?answer=63393#post-id-63393