5 Nov
2008
5 Nov
'08
5:26 a.m.
Hi All, I'm thinking of adding some new ufuncs. Some possibilities are - expadd(a,b) = exp(a) + exp(b) -- For numbers stored as logs: - absdiff(a,b) = abs(a - b) -- Useful for forming norms - absmax(a,b) = max(abs(a), abs(b)) - absadd(a,b) = abs(a) + abs(b) -- Useful for L_1 norm and inequalities? I would really like a powadd = abs(a)**p + abs(b)**p, but I can't think of an easy way to pass a variable p that is compatible with the way ufuncs work without going to three variables, something that might not work with the reduce functions. Along these lines I also think it is time to review generalized ufuncs to see what we can do with them. Thoughts? Chuck