nmpyc_array

Module for array definition and computation.

This module provides an array class and associated functions for corresponding matrix calculations.

The goal of this class and the individual functions is to enable compatibility of calculations with both casadi and numpy objects without changing the syntax of the program. This enables the user to program as easily as possible and at the same time to switch between symbolic and numeric calculation.

Classes

array

Class used to save arrays with symbolic or numeric values.

Functions

abs

Calculates the absolute value of a number or array.

arccos

Calculates the arcuscosinus of a given number or array

arccosh

Calculates the arcuscosinus hypernolicus of a given number or array

arcsin

Calculates the arcussinus of a given number or array

arcsinh

Calculates the arcussinus hyperbolicus of a given number or array

arctan

Calculates the arcustangens of a given number or array

arctanh

Calculates the arcustangens hyperbolicus of a given number or array

concatenate

Join a sequence of arrays along an existing axis.

convert

Convert a numpy-, casadi- or nMPyC-array to another of these intances.

cos

Calculates the cosinus of a given number or array

cosh

Calculates the cosinus hyperbolicus of a given number or array

diag

Creates an diagonal matrix from a given vector.

exp

Calculates the exponential of a given number or array

eye

Creates an array defining the idendity.

log

Calculates the natural logarithm of a given number or array

matrix_power

Raises a square matrix to the n-th power.

max

Return the maximal value of the arguments

min

Returns the minimal value of the arguments

norm

Returns the norm of a vector or matrix.

ones

Creates an array with only entries equal to one.

power

Calculates the (elementwise) n-th power of a number or array.

reshape

Reshape an array to a new size.

sin

Calculates the sinus of a given number or array

sinh

Calculates the sinus hyperbolicus of a given number or array

sqrt

Calculates the square root of a given number or array

tan

Calculates the tangens of a given number or array

tanh

Calculates the tangens hyperblicus of a given number or array

zeros

Creates an array with only zero entries.

Attributes

inf

Constant to define infinity.

pi

Constant to define the number pi.