From: Peter V. <Pet...@in...> - 2005-12-14 13:03:43
|
Hi all, When I assign values to a subdomain of an array I do not get the expected result. Am I overlooking something or could this be a bug? A.resize(3, 3); A = 0.; A(blitz::Range(1,2), blitz::Range(1,2)) = 1,2, 3,4; The resulting A-array is: A: 3 x 3 [ 0 0 0 0 1 2 3 4 0 ] while I expected: A: 3 x 3 [ 0 0 0 0 1 2 0 3 4 ] Can you please find where the problem is located? kind regards Peter ps. #### TESTPROGRAM: main.cpp #include <iostream> using namespace std; #include <blitz/array.h> int main(){ blitz::Array<double,2> A(3, 3); A = 0.; A(blitz::Range(1,2), blitz::Range(1,2)) = 1,2, 3,4; cout << "A: " << A << endl; return 0; } -- ********************************************************** Peter Vandersteegen Ghent University - IMEC Dept. of Information Technology (INTEC) Sint-Pietersnieuwstraat 41, B-9000 Gent, Belgium Tel: +32 9 264 3447 Fax: +32 9 264 3593 Email: Peter.Vandersteegen@UGent.be Website: photonics.intec.ugent.be ********************************************************** |