Skip to content

added logspace to math#181

Merged
Mc-Zen merged 5 commits intolilaq-project:mainfrom
Ants-Aare:main
Feb 24, 2026
Merged

added logspace to math#181
Mc-Zen merged 5 commits intolilaq-project:mainfrom
Ants-Aare:main

Conversation

@Ants-Aare
Copy link
Contributor

I wanted to display numbers on a logspace diagram without having to rewrite the same lines everytime, so here it is.
https://numpy.org/doc/stable/reference/generated/numpy.logspace.html

@Mc-Zen
Copy link
Member

Mc-Zen commented Feb 23, 2026

Hi, thank you for the addition.

This is just (almost) equivalent to

linspace(start, end, num: num, include-end: include-end).map(x => calc.pow(base, x))

I think. I believe this would be a cleaner implementation and also properly work with inverted ranges where end < start.

Also, can you add a few simple tests to tests/math/test.typ in the same style as the ones for linspace?

@Ants-Aare
Copy link
Contributor Author

agreed. updated 👍

@Mc-Zen
Copy link
Member

Mc-Zen commented Feb 23, 2026

Please review your previous change. You changed the impl of linspace now instead of logspace.

@Mc-Zen
Copy link
Member

Mc-Zen commented Feb 24, 2026

Looks good now, thank you!

@Mc-Zen Mc-Zen merged commit ac72af9 into lilaq-project:main Feb 24, 2026
1 check passed
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