Skip to content

Commit

Permalink
gh-35686: fixing a lot of pycostyle warnings in calculus folder
Browse files Browse the repository at this point in the history
    
<!-- Please provide a concise, informative and self-explanatory title.
-->
<!-- Don't put issue numbers in the title. Put it in the Description
below. -->
<!-- For example, instead of "Fixes #12345", use "Add a new method to
multiply two integers" -->

### 📚 Description

This is fixing a lot of pycodestyle warnings in the `calculus` folder,
in particular in `desolvers.py`.

<!-- Describe your changes here in detail. -->
<!-- Why is this change required? What problem does it solve? -->
<!-- If this PR resolves an open issue, please link to it here. For
example "Fixes #12345". -->
<!-- If your change requires a documentation PR, please link it
appropriately. -->

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. It should be `[x]` not `[x
]`. -->

- [x] The title is concise, informative, and self-explanatory.
- [x] The description explains in detail what this PR is about.
- [ ] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation accordingly.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on
- #12345: short description why this is a dependency
- #34567: ...
-->

<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
    
URL: #35686
Reported by: Frédéric Chapoton
Reviewer(s): Matthias Köppe
  • Loading branch information
Release Manager committed Jun 3, 2023
2 parents a8c3d77 + af62ec2 commit 16a6651
Show file tree
Hide file tree
Showing 7 changed files with 182 additions and 211 deletions.
27 changes: 14 additions & 13 deletions src/sage/calculus/all.py
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@

from .calculus import maxima as maxima_calculus
from .calculus import (laplace, inverse_laplace,
limit, lim)
limit, lim)

from .integration import numerical_integral, monte_carlo_integral
integral_numerical = numerical_integral

from .interpolation import spline, Spline

from .functional import (diff, derivative,
expand,
taylor, simplify)
expand,
taylor, simplify)

from .functions import (wronskian,jacobian)
from .functions import (wronskian, jacobian)

from .ode import ode_solver, ode_system

from .desolvers import (desolve, desolve_laplace, desolve_system,
eulers_method, eulers_method_2x2,
eulers_method_2x2_plot, desolve_rk4, desolve_system_rk4,
desolve_odeint, desolve_mintides, desolve_tides_mpfr)
eulers_method, eulers_method_2x2,
eulers_method_2x2_plot, desolve_rk4, desolve_system_rk4,
desolve_odeint, desolve_mintides, desolve_tides_mpfr)

from .var import (var, function, clear_vars)

from .transforms.all import *

# We lazy_import the following modules since they import numpy which slows down sage startup
from sage.misc.lazy_import import lazy_import
lazy_import("sage.calculus.riemann",["Riemann_Map"])
lazy_import("sage.calculus.interpolators",["polygon_spline","complex_cubic_spline"])
lazy_import("sage.calculus.riemann", ["Riemann_Map"])
lazy_import("sage.calculus.interpolators", ["polygon_spline", "complex_cubic_spline"])

from sage.modules.free_module_element import vector
from sage.matrix.constructor import matrix
Expand Down Expand Up @@ -77,21 +77,21 @@ def symbolic_expression(x):
If ``x`` is a list or tuple, create a vector of symbolic expressions::
sage: v=symbolic_expression([x,1]); v
sage: v = symbolic_expression([x,1]); v
(x, 1)
sage: v.base_ring()
Symbolic Ring
sage: v=symbolic_expression((x,1)); v
sage: v = symbolic_expression((x,1)); v
(x, 1)
sage: v.base_ring()
Symbolic Ring
sage: v=symbolic_expression((3,1)); v
sage: v = symbolic_expression((3,1)); v
(3, 1)
sage: v.base_ring()
Symbolic Ring
sage: E = EllipticCurve('15a'); E
Elliptic Curve defined by y^2 + x*y + y = x^3 + x^2 - 10*x - 10 over Rational Field
sage: v=symbolic_expression([E,E]); v
sage: v = symbolic_expression([E,E]); v
(x*y + y^2 + y == x^3 + x^2 - 10*x - 10, x*y + y^2 + y == x^3 + x^2 - 10*x - 10)
sage: v.base_ring()
Symbolic Ring
Expand Down Expand Up @@ -229,4 +229,5 @@ def symbolic_expression(x):
return SR(result).function(*vars)
return SR(x)


from . import desolvers
1 change: 1 addition & 0 deletions src/sage/calculus/calculus.py
Original file line number Diff line number Diff line change
Expand Up @@ -2115,6 +2115,7 @@ def dummy_pochhammer(*args):
from sage.functions.gamma import gamma
return gamma(x + y) / gamma(x)


#######################################################
#
# Helper functions for printing latex expression
Expand Down
Loading

0 comments on commit 16a6651

Please sign in to comment.