Request: logspace that doesn't require log(a) as argument
See original GitHub issuelinspace(a, b, 10) creates 10 points linearly spaced from a to b.
logspace(a, b, 10) does not create 10 points logarithmically spaced from a to b, as everyone expects it to:
- http://stackoverflow.com/q/31480033/125507
- http://stackoverflow.com/q/31192392/125507
- https://sourceforge.net/p/numpy/mailman/numpy-discussion/thread/Mahogany-0.66.0-0000-00000000-111126.00@CASC64043305.american.edu/
The current behavior can’t be changed because of backwards/matlab compatibility, but it would be nice if there were another function that didn’t require the extra step of logspace(log(a), log(b)...
.
I don’t know what it should be called, though.
Issue Analytics
- State:
- Created 8 years ago
- Reactions:1
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Generate logarithmically spaced vector - MATLAB logspace
This MATLAB function generates a row vector y of 50 logarithmically spaced points between decades 10^a and 10^b.
Read more >numpy.logspace — NumPy v1.24 Manual
Return numbers spaced evenly on a log scale. In linear space, the sequence starts at base ** start (base to the power of...
Read more >numpy.logspace() in Python - GeeksforGeeks
The numpy.logspace() function returns number spaces evenly w.r.t interval on a log scale. Syntax : numpy.logspace(start, stop, num = 50, ...
Read more >Does there exist any alternative of `logspace` in Julia (v1.3.1)?
This returns a generator, so it will not allocate an array, and should be easy to understand and use for other users.
Read more >logsecond - Number of secondary log files configuration ... - IBM
For example, an application that is run once a month might require log space beyond that provided by the primary log files. Because...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The syntax seems to be taken from Matlab.
I’m terrible at naming, but your function would build a geometric sequence, so maybe something along the lines of
geomspace
?Also, getting rid of the
base
parameter seems to make all the sense here.But we should be having this discussion on the mailing list.
@jaimefrio I just found spacepy.toolbox.geomspace. Same name, same syntax. 😃