[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Access data in an NDArray
From: |
Fredrik Lingvall |
Subject: |
Access data in an NDArray |
Date: |
Thu, 31 Aug 2006 11:07:57 +0200 |
User-agent: |
Thunderbird 1.5.0.5 (X11/20060802) |
For a Matrix I can get a pointer to the data using, for example,
const Matrix tmp = args(0).matrix_value();
A_M = tmp.rows();
A_N = tmp.cols();
A = (double*) tmp.fortran_vec();
Now I want to do that for a (3D) NDArray, that is, I want
a pointer to each (2D) Matrix in the NDArray. How do
I do that? Is the data stored in one consecutive block so
that I can use pointer arithmetics to find each Matrix in
the NDArray?
Regards,
Fredrik
- Access data in an NDArray,
Fredrik Lingvall <=