evaluating a function in a matrix element???
19 Mar
2010
19 Mar
'10
7:55 a.m.
class X:
... def __mul__(self, other): ... return numpy.random.random() * other ... def __rmul__(self, other): ... return other * numpy.random.random()
Thanks for that Friedrich! I had forgotten about __mul__, __rmul__, __float__ et al. I think that using a class method instead of a function and overriding those __*__ methods is the cleaner way to do the task I need. Cheers, Frank Horowitz frank@horow.net
5321
Age (days ago)
5321
Last active (days ago)
0 comments
1 participants
participants (1)
-
Frank Horowitz