| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
As per the discussion during the maintainers meeting, support for matching vectors to corresponding matrix dimensions was dropped due to ambiguous cases with multiple matching dimensions. Instead, only the 1s wild-card style broadcasting will be supported: array a = randu(5, 3) + randu(5); // Okay array b = randu(5, 3) + randu(3); // Fails array c = randu(5, 1, 3) + randu(5); // Okay array d = randu(5, 1, 3) + randu(1, 4); // Okay array e = randu(5, 1, 3) + randu(1, 1, 3); // Okay array f = randu(5, 1, 3) + randu(5, 5, 3); // Okay array g = randu(5, 1, 3) + randu(5, 3, 3); // Okay array i = randu(3, 255, 255) + randu(3); // Okay |
Sorry, something went wrong.
Co-authored-by: Umar Arshad <umar@arrayfire.com>
| Back | FazBrowse Home | New Git URL |
Will prepend 1s until dimension sizes match, then 1s are treated as wildcards and are broadcasted to their matching sizes.
In cases where one of the arguments is a vector, prepending until dimensions match may not align well:
Upon a mismatch, the prepended vectors will be shifted left until there is a match. In the above example the broadcast will be a success after a single additional shift.
This manner of treating vectors is a workaround due to no difference between.
TODO: