> > I am -1 on multiple signatures. We may revisit this in time, but for now I > find the minimal intrusiveness of the current changes appealing, especially > as it requires few to no changes whatsoever to the inner loop function. > Multiple dispatch could easily break that model by allowing very different > signatures to be aggregated into a single ufunc, leading to unhandled edge > cases and strange segfaults. It also seems to me that looping over all > signatures might slow down ufunc calling, leading to endless variations of > strategies of optimizing signature ordering.
I had actually started trying Allan's suggestion [1], and at least parsing is not difficult. But I will stop now, as I think your point about the inner loop really needing a fixed set of sizes and strides is deadly for the whole idea. (Just goes to show I should think before writing code!) As is, all the proposed changes do is fiddle with size 1 axes (well, and defining a fixed size rather than letting the operand do it), which of course doesn't matter for the inner loop. -- Marten [1] https://github.com/numpy/numpy/compare/master...mhvk:gufunc-multiple-dispatch?expand=1
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@python.org https://mail.python.org/mailman/listinfo/numpy-discussion