-
Notifications
You must be signed in to change notification settings - Fork 129
Some numba backend fixes #46
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
Conversation
aseyboldt
commented
Nov 28, 2022
- implementations for numba special functions
- numba impl fix for cumop
- Fix for numba svd
- Preserve names in graph replacements
- Remove broken AdvancdIndexing numba op
- Deal with negative axis args
- numba impl for checkandraise
@aseyboldt Are you porting over a PR from aesara? If so, you can use the |
Yes, I just wanted to make sure we don't duplicate that work |
def normalize_axis(axis, ndim): | ||
if axis is None: | ||
return axis | ||
|
||
if axis < 0: | ||
axis = ndim + axis | ||
|
||
if axis < 0 or axis >= ndim: | ||
raise np.AxisError(ndim=ndim, axis=axis) | ||
return axis |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can just use
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dod you decide not to use these?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry, done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just the nitpick not to reinvent the numpy axis helpers.
|
||
@dataclass | ||
class Signature: | ||
res_dtype: DTypeLike |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it a single output signature?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this currently only supports scalar return values. This is all we need for the scipy.special functions, but if we need more later (maybe for some linalg stuff?) we might have to expand it a bit.