# naginterfaces.library.matop.real_​band_​pack¶

naginterfaces.library.matop.real_band_pack(job, kl, ku, a, b)[source]

real_band_pack copies a real band matrix stored in a packed array into an unpacked array, or vice versa.

For full information please refer to the NAG Library document for f01zc

https://www.nag.com/numeric/nl/nagdoc_28.4/flhtml/f01/f01zcf.html

Parameters
jobstr, length 1

Specifies whether the band matrix is to be packed or unpacked.

(Pack)

The band matrix is to be packed into array .

(Unpack)

The band matrix is to be unpacked into array .

klint

, the number of subdiagonals of the band matrix.

kuint

, the number of superdiagonals of the band matrix.

afloat, array-like, shape

If , the leading part of must contain the band matrix stored in unpacked form. Elements of the array that lie outside the banded part of the matrix are not referenced and need not be assigned.

bfloat, array-like, shape

If , must contain the band matrix in packed form, in the leading part of the array. The matrix is packed column by column, with the leading diagonal of the matrix in row of , the first superdiagonal starting at position in row , the first subdiagonal starting at position in row , and so on. Elements of that are not needed to store the band matrix, for instance the leading triangle, are not referenced and need not be assigned.

Returns
afloat, ndarray, shape

If , the leading part of contains the band matrix stored in unpacked form. Elements of the leading part of that are not within the banded part of the matrix are assigned the value zero.

bfloat, ndarray, shape

If , contains the band matrix stored in packed form. Elements of that are not needed to store the band matrix are not referenced.

Raises
NagValueError
(errno )

On entry, .

Constraint: or .

(errno )

On entry, .

Constraint: .

(errno )

On entry, .

Constraint: .

(errno )

On entry, , and .

Constraint: .

(errno )

On entry, .

Constraint: .

(errno )

On entry, .

Constraint: .

Notes

No equivalent traditional C interface for this routine exists in the NAG Library.

real_band_pack unpacks a band matrix that is stored in a packed array, or packs a band matrix that is stored in an unpacked array. The band matrix has rows, columns, nonzero subdiagonals, and nonzero superdiagonals. This function is intended for possible use in conjunction with functions from submodule blas, submodule lapacklin and submodule lapackeig, where functions that use band matrices store them in the packed form described below.