finesse.cymath.cmatrix.SubCCSView1DArray

Overview

class finesse.cymath.cmatrix.SubCCSView1DArray

Bases: object

This is a class for storing sub-matrix views for coupling directly to another single SubCCSView. It offers a 1D PyObject* array which can be iterated over in C for fast access matrix data without having to do reference inc/dec in fast loops.

It can be accessed from Python for setting views, however it doesn’t support slicing or wraparounds.

Examples

Cython access to views should be cast to a SubCCSView before using it:

>>>> (<SubCCSView>arr.views[i]).fill()

This should result in no python calls when checking the Cython analysis information.

If you store this SubCCSView into a variable then a reference count will happen.

Properties

SubCCSView1DArray.ndim

Number of dimensions of this collection of SubCCSViews