Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
base: make diff() use views and broadcasting #29827
This uses array views and broadcasting to implement diff() in arbitrary dimension.
timholy left a comment
Very nice @stev47, just one tiny thing to fix and then I think this can be merged. There's some chance we'd need #28941 to solve this elegantly for arrays with offset axes, so I think it's fine to restrict this to 1-indexed arrays for now.
(@juliohm, this is the implementation I was hinting at with my comment about "in one go.")