array

class array(dim=0)[source]

Class used to save arrays with symbolic or numeric values.

The symbolic entries are provided by CasADi and will be transformed automatically to numeric values of numpy type if it is posiible.

Parameters:

dim (int, tuple, cas.MX, cas.SX, cas.DM, list or numpy.ndarray, optional) – Dimension of which an empty array is created or object from which the entries and dimension are copied. The default is 0.

Attributes

array.A

Array containing all entries.

array.T

Transposed array.

array.dim

Dimension of the array.

array.symbolic

True if array has symbolic entries, False otherwise.

Methods

array.fill

Fill all entries with one value.

array.flatten

Flat array to one dimension.

array.transpose

Transpose array.