- Accessing an array
*foo*with*foo.ndim == 3*:- The array itself will be accessable through the
*FOO3(i, j, k)*function. - Array assignments will be the same.
*FOO3(i, j, k) = bar;* *foo.shape*will be accessable through the*Nfoo[]*array.

- The array itself will be accessable through the

```
long dim1, dim2, dim3;
dim1 = Nfoo[0]; // dimension access.
dim2 = Nfoo[1];
dim3 = Nfoo[2];
FOO3(0,0,0) = 1; // array assignment
return_val = FOO3(0,0,0); // array access.
```

```
import scipy
import scipy.weave
inline_code = r"""
put C/C++ code in here
"""
foo = scipy.arange(3**3).reshape((3,3,3))
scipy.weave.inline(inline_code, foo)
```

Call *foo.call(py:tuple arg)*.

- At Weave and Numpy array arguments: Scipy's Weave page
- Calling Python functions from inline C with scipy.weave (stackoverflow)