pyaml.magnet.inline_matrix#

Magnet response matrices.

This module defines matrix representations used by magnet models.

Classes

InlineMatrix(mat)

Matrix defined directly from in-memory data.

class pyaml.magnet.inline_matrix.InlineMatrix(mat)#

Bases: Matrix, DynamicValidation

Matrix defined directly from in-memory data.

Parameters:

mat (list[list[float]]) – Matrix data given as a nested list of numbers.

Attributes

_mat

Internal NumPy representation of the matrix.

Methods

get_matrix()

Get the matrix data.

get_matrix()#

Get the matrix data.

Returns:

np.array – Matrix data as a numpy array

Return type:

NDArray[float64]

property mat#

Return the original in-memory magnet matrix.