Skip to content

Enhance mdexport to annotate rand() and randn() using sympy#63

Open
Utkarsha2811 wants to merge 3 commits intobrian-team:masterfrom
Utkarsha2811:auto-annotate-rand-sympy
Open

Enhance mdexport to annotate rand() and randn() using sympy#63
Utkarsha2811 wants to merge 3 commits intobrian-team:masterfrom
Utkarsha2811:auto-annotate-rand-sympy

Conversation

@Utkarsha2811
Copy link
Copy Markdown
Contributor

@Utkarsha2811 Utkarsha2811 commented Mar 14, 2026

Problem: The Markdown exporter currently displays raw strings for initializations using rand() and randn() without providing mathematical context.

Solution: I used SymPy to analyze these expressions. The exporter now calculates and displays exact lower/upper bounds for rand() and the mean/variance for randn() in the exported Markdown descriptions.

@mstimberg
Copy link
Copy Markdown
Member

Hi @Utkarsha2811. Thanks for the PR! I won't be able to review it right away, so please be a bit patient.

@Utkarsha2811
Copy link
Copy Markdown
Contributor Author

Hi @Utkarsha2811. Thanks for the PR! I won't be able to review it right away, so please be a bit patient.

Thanks, Meanwhile I'll recheck and update PR description.

@mstimberg
Copy link
Copy Markdown
Member

Hi @Utkarsha2811, sorry for the delay in getting back to this PR. Since you opened it, the master branch has moved on, and it now triggers the test suite for pull requests. Could you please merge the current master into your branch so that the test suite runs here as well? Thanks 🙏

@Utkarsha2811
Copy link
Copy Markdown
Contributor Author

Hey @mstimberg, I've merged master so the test suite will run. I also took the opportunity to do some minor refactoring and added tests while I was at it. Let me know what you think!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants