Blitz logo

Blitz Support :

From: Patrik (patrik_at_[hidden])
Date: 2004-06-13 03:48:24


hi all,
i'm using tensor expressions to do some reductions:

     broadband_flux =
       (sum (image (tensor::i, tensor::j, tensor::l)*
            passbands (tensor::k, tensor::l)*delta_lambda (tensor::l),
            tensor::l)/ewidth (tensor::k));

     Array<double,1> broadband_L_integrated
       (sum (L_lambda_integrated (tensor::j)*
            passbands_integrated (tensor::i, tensor::j)*
            delta_lambda_integrated (tensor::j), tensor::j)/
       ewidth_integrated(tensor::i));

The first one works, while the second one gives the following error (it's
the division that's the offending part, the sum by itself works):

/u7/patrik/include/blitz/array/expr.h:276 Two array operands have different
orders: for rank 0, the orders are 1 and 0
Assertion failed: 0, file /u7/patrik/include/blitz/array/expr.h, line 279

I don't even know what the error message means... The two expressions are
very similar (the only difference is that the first one has a 3d array and
the second one has a 1d one, so I don't understand why one works but not
the other. Any hints?

Regards,

/Patrik