Implement take_along_axis function per Python Array API
The function is planned for Python Array API 2024.12 specification.
- [x] Have you provided a meaningful PR description?
- [ ] Have you added a test, reproducer or referred to an issue with a reproducer?
- [ ] Have you tested your changes locally for CPU and GPU devices?
- [ ] Have you made sure that new changes do not introduce compiler warnings?
- [ ] Have you checked performance impact of proposed changes?
- [x] If this PR is a work in progress, are you opening the PR as a draft?
Deleted rendered PR docs from intelpython.github.com/dpctl, latest should be updated shortly. :crossed_fingers:
coverage: 87.927% (+0.2%) from 87.739% when pulling d07de324a3583b899c9d26567b56c722a92f97eb on take-along-axis into d79dae1d2f8483d497b3b3d914738a80fb8bfd63 on master.
Array API standard conformance tests for dpctl=0.18.0dev0=py310ha798474_205 ran successfully. Passed: 894 Failed: 1 Skipped: 119
Array API standard conformance tests for dpctl=0.18.0dev0=py310ha798474_208 ran successfully. Passed: 894 Failed: 1 Skipped: 119
Array API standard conformance tests for dpctl=0.18.0dev0=py310ha798474_209 ran successfully. Passed: 894 Failed: 1 Skipped: 119
Array API standard conformance tests for dpctl=0.18.0dev0=py310ha798474_235 ran successfully. Passed: 894 Failed: 1 Skipped: 119
Array API standard conformance tests for dpctl=0.18.0dev0=py310ha798474_237 ran successfully. Passed: 894 Failed: 1 Skipped: 119
Array API standard conformance tests for dpctl=0.18.0dev0=py310ha798474_239 ran successfully. Passed: 894 Failed: 1 Skipped: 119
Array API standard conformance tests for dpctl=0.18.0dev0=py310ha798474_240 ran successfully. Passed: 894 Failed: 1 Skipped: 119
Array API standard conformance tests for dpctl=0.18.0dev0=py310ha798474_245 ran successfully. Passed: 894 Failed: 1 Skipped: 119
Array API standard conformance tests for dpctl=0.18.0dev0=py310ha798474_245 ran successfully. Passed: 894 Failed: 1 Skipped: 119
Array API standard conformance tests for dpctl=0.18.0dev0=py310ha798474_246 ran successfully. Passed: 894 Failed: 1 Skipped: 119
@oleksandr-pavlyk I am going to try to take a look at this today.
One thing that I did realize, though: would it make sense to add put_along_axis as an inverse function? Array API obviously won't yet due to mutation issues, but we already have put, it seems like a good idea, maybe for a separate PR.
One thing that I did realize, though: would it make sense to add
put_along_axisas an inverse function?
Yes, makes total sense. Let's do it in a separate PR though.