This issue is mostly to remind us/@embray of an idea that mentioned in #3861 (comment): could one not just support operations like + on model classes but also np.ufunc? This would seem possible if one defined __numpy_ufunc__ appropriately, and would mean one would nearly for free get all ufuncs covered as models, ie., one could have np.sin(Const1D+Scale) construct a new model class.
Possibly somewhat unrelatedly, by way of similarity, it might then be good to have F | G being equivalent to G(F) -- obviously, this needs some trickery in G.__new__...
This issue is mostly to remind us/@embray of an idea that mentioned in #3861 (comment): could one not just support operations like
+on model classes but alsonp.ufunc? This would seem possible if one defined__numpy_ufunc__appropriately, and would mean one would nearly for free get allufuncs covered as models, ie., one could havenp.sin(Const1D+Scale)construct a new model class.Possibly somewhat unrelatedly, by way of similarity, it might then be good to have
F | Gbeing equivalent toG(F)-- obviously, this needs some trickery inG.__new__...