-
Notifications
You must be signed in to change notification settings - Fork 307
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add logspace
constructor
#617
Conversation
Signed-off-by: JP-Ellis <josh@jpellis.me>
Thanks for working on this @JP-Ellis! To move this forward it would be nice to have tests for these new functions, testing both happy and unhappy paths 👍 |
Signed-off-by: JP-Ellis <josh@jpellis.me>
@LukeMathWalker All done, I have added tests within a |
Signed-off-by: JP-Ellis <josh@jpellis.me>
Signed-off-by: JP-Ellis <josh@jpellis.me>
I haven't had a chance to review this in detail, but at first glance, I had a couple of thoughts:
|
If we decide to keep compatibility with their naming convention, then I'd advice to add a
I have the same gut feeling that |
Signed-off-by: JP-Ellis <josh@jpellis.me>
Great, so I've renamed the Additionally, I've changed the way each step is calculated to avoid a possible small error from accumulating. Before merging this, I would recommend that this pull request be squashed into one commit. |
It looks good to me - happy to squash and merge 🚀 |
This pull requests adds the
logspace
constructor for Array1 that works in the same way aslinspace
but creates logarithmically spaced floats.This implementation supports both positive and negative intervals, though
(obviously) not intervals which cross
0.0
.