zero.solve.scipy module

class zero.solve.scipy.ScipySolver[source]

Bases: zero.solve.base.BaseSolver

Scipy-based matrix solver

DTYPE = 'complex128'
NAME = 'scipy-default'
full(dimensions)[source]

Create new complex-valued full matrix

Creates a Numpy full matrix.

Parameters

dimensions (tuple) – matrix shape

Returns

ndmatrix – full matrix

solve(A, b)[source]

Solve linear system

Parameters
  • A (ndarray, spmatrix) – square matrix

  • B (ndarray, spmatrix) – matrix or vector representing right hand side of matrix equation

Returns

solution (ndarray, spmatrix) – x in the equation Ax = b

sparse(dimensions)[source]

Create new complex-valued sparse matrix

Creates a SciPy sparse matrix.

Parameters

dimensions (tuple) – matrix shape

Returns

lil_matrix – sparse matrix