Guidance regarding replacing as_leading_term in place of extract_leading_order #22256
Replies: 2 comments 2 replies
-
There is no need for a separate |
Beta Was this translation helpful? Give feedback.
-
I think the support for multivariate expressions in Line 213 in 7d104b6 https://gist.github.com/0sidharth/f9d6db5db6d7376dc3184ea8fb096dbb This works for all test cases as far as I can see, with the following two changes (which seem not too big of an issue to me) - In [1]: e = x*y*sin(x)*Integral(x, (x, 1, 2))
...: O(e)
Out[1]: O(x⋅y⋅sin(x); (x, y) → (0, 0))
# Previously
# ⎛ 2 ⎞
# O⎝x ⋅y; (x, y) → (0, 0)⎠
In [2]: Order(x + 2*y)
Out[2]: O(x + 2⋅y; (x, y) → (0, 0)) # Previously O(x + y; (x, y) → (0, 0)) |
Beta Was this translation helpful? Give feedback.
-
Hello All ,as discussed in a recent PR ,
extract_leading_order
ofcore/add.py
is being deprecated because it is buggy and is used just once in the whole codebase(series module). So the line containing that is planned to be replaced by theas_leading_term
method for better consistency. Nowextract_leading_order
returns the leading-term and the order of the leading-term as a tuple of tuple so recreating this using justas_leading_term
wasn't a big dealJust the git diff below would be enough to pass all related tests in order/limits/gruntz except those having
exp(1/x)
in them cause it would raise pole error hence the try -except block to deal with it ! But I am not sure what should the except block contains or how to deal with this rest all cases are working absolutely fine ! The problem is thatSo I would be glad if anyone could guide me through the except block or rather what should come in place of pass .Thank You !
Beta Was this translation helpful? Give feedback.
All reactions