Blitz logo

Blitz Support :

From: Faheem Mitha (faheem_at_[hidden])
Date: 2004-12-19 17:48:58


On Sun, 19 Dec 2004, Faheem Mitha wrote:

>
> Hi,
>
> I'm trying to do the following

Ok. I think that

2.4.6: A note about assignment

explains why this is not working. Namely,

**************************************************************************
Very important: whenever you have an assignment operator (=, +=, -=, etc.)
the lhs must have the same shape as the rhs. If you want the array on the
left hand side to be resized to the proper shape, you must do so by
calling the resize method, for example:

A.resize(B.shape()); // Make A the same size as B
A = B;
****************************************************************************

I am not sure why the first example does not give an error as well,
though.

                                                                   Faheem.