Skip to content
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

Implement np.logspace and np.geomspace #6301

Closed
holymonson opened this issue Oct 5, 2020 · 3 comments
Closed

Implement np.logspace and np.geomspace #6301

holymonson opened this issue Oct 5, 2020 · 3 comments

Comments

@holymonson
Copy link

Feature request

Implement np.logspace and np.geomspace, the code in numpy seems easy.

@array_function_dispatch(_logspace_dispatcher)
def logspace(start, stop, num=50, endpoint=True, base=10.0, dtype=None,
             axis=0):
    y = linspace(start, stop, num=num, endpoint=endpoint, axis=axis)
    if dtype is None:
        return _nx.power(base, y)
    return _nx.power(base, y).astype(dtype, copy=False)
@esc
Copy link
Member

esc commented Oct 5, 2020

@holymonson thanks for submitting this. We track missing Numpy implementation in the issue at #4074 - but the functions requested were not yet part of that list. I have added them to the Issue now and will close this one to avoid duplication. Please feel free to add some tests and submit the suggested code as a pull-request.

@Unoaccaso
Copy link

seems to me that geomspace is not implemented yet.

@esc
Copy link
Member

esc commented Dec 11, 2023

seems to me that geomspace is not implemented yet.

@Unoaccaso thank you for asking about this. I think you may have missed something? Or perhaps you are on an older version? I just had a look at the release notes for 0.58 and it clearly states that np.geomspace was added in that version:

https://numba.readthedocs.io/en/stable/release/0.58.0-notes.html#added-support-for-np-geomspace-function

Does that help?

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

No branches or pull requests

3 participants