Skip to content

Commit

Permalink
move residue() to the calculus module
Browse files Browse the repository at this point in the history
  • Loading branch information
skirpichev committed Dec 28, 2022
1 parent ca5b73e commit 4dd9b2a
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 10 deletions.
4 changes: 2 additions & 2 deletions diofant/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
IntegerRing, PythonRational, QQ_gmpy, QQ_python,
RationalField, RealAlgebraicField, RealField, ZZ_gmpy,
ZZ_python, IntegerModRing)
from .series import Limit, O, Order, limit, residue
from .series import Limit, O, Order, limit
from .functions import (E1, Abs, Chi, Ci, DiracDelta, Ei, Eijk,
FallingFactorial, Heaviside, Id, KroneckerDelta,
LambertW, LeviCivita, Li, Max, Min, Piecewise,
Expand Down Expand Up @@ -150,7 +150,7 @@
SparseNDimArray, derive_by_array,
get_contraction_structure, get_indices, permutedims,
tensorcontraction, tensorproduct)
from .calculus import maximize, minimize
from .calculus import maximize, minimize, residue
from .combinatorics import (AbelianGroup, AlternatingGroup, Cycle, CyclicGroup,
DihedralGroup, DirectProduct, GrayCode,
IntegerPartition, Partition, Permutation,
Expand Down
3 changes: 2 additions & 1 deletion diofant/calculus/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"""

from .optimization import maximize, minimize
from .residues import residue


__all__ = 'maximize', 'minimize'
__all__ = 'maximize', 'minimize', 'residue'
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from ..core import Integer, Mul, sympify
from .order import Order
from ..series import Order


def residue(expr, x, x0):
Expand Down
3 changes: 1 addition & 2 deletions diofant/series/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"""
from .limits import Limit, limit
from .order import O, Order
from .residues import residue


__all__ = 'Limit', 'O', 'Order', 'limit', 'residue'
__all__ = 'Limit', 'O', 'Order', 'limit'
3 changes: 2 additions & 1 deletion diofant/simplify/hyperexpand.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@
HyperRep_sqrts2, hyper, meijerg)
from ..polys import Poly, cancel
from ..printing import sstr
from ..series import residue
from ..utilities import default_sort_key, sift
from .powsimp import powdenest
from .simplify import simplify
Expand Down Expand Up @@ -2240,6 +2239,8 @@ def can_do(pbm, pap):
return True

def do_slater(an, bm, ap, bq, z, zfinal):
from ..calculus import residue

# zfinal is the value that will eventually be substituted for z.
# We pass it to _hyperexpand to improve performance.
func = G_Function(an, bm, ap, bq)
Expand Down
File renamed without changes.
4 changes: 4 additions & 0 deletions docs/modules/calculus/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ Calculus

.. automodule:: diofant.calculus.optimization
:members:

.. automodule:: diofant.calculus.residues
:members:

3 changes: 0 additions & 3 deletions docs/modules/series.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,3 @@ function and many related functions.

.. automodule:: diofant.series.order
:members:

.. automodule:: diofant.series.residues
:members:

0 comments on commit 4dd9b2a

Please sign in to comment.