-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Dyadic mapslices #5140
Comments
I took a second look at mapslices, I can translate that into the dyadic case. |
For monadic mapslices, the images of the slices get stored along the dimensions sliced over. For dyadic mapslices one would rather break that convention (how should that work when slicing over different dimensions in both arguments...) and reorder dimensions so that the sliced dimensions come after the dimensions iterated over. Having a second version of mapslices with different behaviour in base is not so nice. So I close this for now. |
It would be a nice feature if
mapslices
could have a dyadic counterpart (likemap
hasmap(f, a, b)
) which takes two matricesA
andB
and two slices and applies the two argument functionf
to pairs of slices ofA
andB
.Many operations can be expressed in that form, as a silly example left and right matrix multiplication by a diagonal matrix diagm(d) would correspond to
mapslices(.*, A, 1, d, 1)
respectivemapslices(.*, A, 2, d, 1)
The text was updated successfully, but these errors were encountered: