matfun(exp, x, A) returns a matrix of bare 'exp' symbols with wrong off-diagonals instead of a value or an error
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 75/100
Research direction
Start with the matfun implementation and its existing tests, especially how bare symbols and applied expressions are represented. Compare the exp and exp(x) paths to find where the symbol is accepted without evaluation. Done means one behavior is implemented consistently: the function is applied to the eigenvalues, or a clear error requires an applied expression, with a regression test for the bare-symbol case.
Written by the indexing model from the issue text.
Description
matfun with a bare function symbol returns a matrix of that symbol instead of a value or an error.
import rssn
s = rssn.Session()
s.compute("matfun(exp, x, list(list(1,0),list(0,2)))").text
# 'list(list(exp, 0), list(0, exp))' <- bare symbols, and the off-diagonals are wrong
s.compute("matfun(exp(x), x, list(list(1,0),list(0,2)))").text
# 'list(list(E, 0), list(0, exp(2)))' <- correct
For A = diag(1,2), matfun(f, x, A) applies f to the eigenvalues, so the answer is diag(exp(1), exp(2)) = diag(E, exp(2)) — which is exactly what the second call returns.
The first call passes exp as a bare function symbol. It returns diag(exp, exp): the symbol itself in each diagonal slot, and zero off-diagonals regardless of the matrix, so for a non-diagonal A the off-diagonals would be wrong as well. .reduced is True and .error is None, so this is presented as a computed result.
The two calls differ only in whether the function is written exp or exp(x), and the docstring does not say which form is expected, so a caller can easily hit the wrong one and get a plausible-looking matrix of symbols back.
Expected: either treat a bare symbol as the function and apply it properly (diag(exp(1), exp(2))), or reject the argument with an error explaining that an applied expression like exp(x) is required.
rssn 0.3.0, Python binding, Windows x86_64.
- Dominant language
- Rust
- Stars
- 36
- Forks
- 3
- Avg merge
- 18h 51m
- Merged PRs (30d)
- 18
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Apich-Organization/rssn
-
area/geometry good first issue help wanted kind/doc-mismatch severity/4-minor
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Apich-Organization/rssn#295 ·
Maintainers usually reply within 1 day
-
area/algebra good first issue help wanted kind/contract severity/4-minor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Apich-Organization/rssn#293 ·
Maintainers usually reply within 1 day
-
area/linear-algebra good first issue help wanted kind/doc-mismatch severity/5-trivial
Difficulty 1/5 Under an hour Newbie friendliness 95/100
Apich-Organization/rssn#276 ·
Maintainers usually reply within 1 day
-
area/number-theory good first issue help wanted kind/contract severity/4-minor
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Apich-Organization/rssn#269 ·
Maintainers usually reply within 1 day
-
area/statistics help wanted kind/wrong-result severity/2-critical
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Apich-Organization/rssn#263 ·
Maintainers usually reply within 1 day
All issues in Apich-Organization/rssn
Similar issues
-
Android bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
anefzaoui/misterdownloadmanager#2516 ·
Maintainers usually reply within 1 day
-
editor ui
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
state:triage tech-debt
Difficulty 2/5 1-3 hours Newbie friendliness 89/100
agent8-cash/ethpayserver#731 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
marketing
Difficulty 2/5 1-3 hours Newbie friendliness 87/100
Maintainers usually reply within 1 day