The only reason I can think of for map to not just do what broadcast does is map's more strict requirements could potentially catch errors. However, I suspect that as soon as you used the result, you would rapidly get an error anyway, so it's possible that we should merge these. There may be some other reason. Probably a good question for julia-dev or a GitHub issue.
On Saturday, May 21, 2016, Tony Kelman <[email protected]> wrote: > I don't think the behavior of repeating scalars, or expanding outer > product dimensions, is really map mathematically, it's something a little > different. Dimension mismatches are likely a bug when you really want map. > > > On Saturday, May 21, 2016 at 10:23:36 AM UTC-7, Steven G. Johnson wrote: >> >> >> >> On Saturday, May 21, 2016 at 12:36:31 PM UTC-4, Tony Kelman wrote: >>> >>> I can't think of any aside from the behavior when dimensions don't >>> match, which falls under your exceptions... exception. >>> >>> Maybe map could have a flag to set whether to be picky about matching >>> dimensions, or behave like broadcast if not? >>> >> >> Why not just have map behave all the time like broadcast? >> >
