-
Notifications
You must be signed in to change notification settings - Fork 24.8k
Implement np.diff
for single order differences
#50569
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
Changes from 1 commit
5e99c87
1deba99
3afa2bc
84f28c4
c948f1d
abe47a0
19bb4d4
ca2fc91
1e99f18
c86c91a
49a17ad
de86880
c301c8e
04d4936
ad276dc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1374,20 +1374,17 @@ | |
variants: method | ||
|
||
- func: diff.Tensor_Tensor(Tensor self, int n=1, int dim=-1, Tensor? prepend=None, Tensor? append=None) -> Tensor | ||
use_c10_dispatcher: hacky_wrapper_for_legacy_signatures | ||
variants: function, method | ||
dispatch: | ||
Math: diff_tensor_tensor | ||
|
||
- func: diff.Tensor_Scalar(Tensor self, int n=1, int dim=-1, Tensor? prepend=None, Scalar? append=None) -> Tensor | ||
use_c10_dispatcher: hacky_wrapper_for_legacy_signatures | ||
cpp_no_default_args: ['n', 'dim', 'prepend', 'append'] | ||
variants: function, method | ||
dispatch: | ||
Math: diff_tensor_scalar | ||
|
||
- func: diff.Scalar_Tensor(Tensor self, int n=1, int dim=-1, Scalar? prepend=None, Tensor? append=None) -> Tensor | ||
use_c10_dispatcher: hacky_wrapper_for_legacy_signatures | ||
cpp_no_default_args: ['n', 'dim', 'prepend', 'append'] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can "append" not have a default here? I think prepend being scalar is enough to disambiguate the other overloads. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah yeah, good catch. But looks like from the comments above, we might end up just landing only the Tensor versions for now. |
||
variants: function, method | ||
dispatch: | ||
|
@@ -1400,20 +1397,17 @@ | |
Math: diff_scalar_scalar | ||
|
||
- func: diff.Tensor_Tensor_out(Tensor self, int n=1, int dim=-1, Tensor? prepend=None, Tensor? append=None, *, Tensor(a!) out) -> Tensor(a!) | ||
use_c10_dispatcher: hacky_wrapper_for_legacy_signatures | ||
variants: function | ||
dispatch: | ||
Math: diff_tensor_tensor_out | ||
|
||
- func: diff.Tensor_Scalar_out(Tensor self, int n=1, int dim=-1, Tensor? prepend=None, Scalar? append=None, *, Tensor(a!) out) -> Tensor(a!) | ||
use_c10_dispatcher: hacky_wrapper_for_legacy_signatures | ||
cpp_no_default_args: ['n', 'dim', 'prepend', 'append'] | ||
variants: function | ||
dispatch: | ||
Math: diff_tensor_scalar_out | ||
|
||
- func: diff.Scalar_Tensor_out(Tensor self, int n=1, int dim=-1, Scalar? prepend=None, Tensor? append=None, *, Tensor(a!) out) -> Tensor(a!) | ||
use_c10_dispatcher: hacky_wrapper_for_legacy_signatures | ||
cpp_no_default_args: ['n', 'dim', 'prepend', 'append'] | ||
variants: function | ||
dispatch: | ||
|
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.
@smessmer be nice to have a
.map()
polyfill for these, any plans? :)