On Wed, May 21, 2008 at 4:07 PM, Robert Kern <[EMAIL PROTECTED]> wrote:
> On Wed, May 21, 2008 at 5:28 PM, Keith Goodman <[EMAIL PROTECTED]> wrote:
>> I have a class that stores some of its data in a matrix. I can't
>> figure out how to do right adds with a matrix. Here's a toy example:
>>
>> class
On Wed, May 21, 2008 at 5:28 PM, Keith Goodman <[EMAIL PROTECTED]> wrote:
> I have a class that stores some of its data in a matrix. I can't
> figure out how to do right adds with a matrix. Here's a toy example:
>
> class Myclass(object):
>
>def __init__(self, x, a):
>self.x = x # nump
I have a class that stores some of its data in a matrix. I can't
figure out how to do right adds with a matrix. Here's a toy example:
class Myclass(object):
def __init__(self, x, a):
self.x = x # numpy matrix
self.a = a # some attribute, say, an integer
def __add__(self