MatPythonSetType — PETSc 3.25.2 documentation

Skip to main content
`Ctrl`+`K`

# MatPythonSetType

Initialize a `Mat` object implemented in Python.

## Synopsis

    #include "petscmat.h"
    PetscErrorCode MatPythonSetType(Mat mat, const char pyname[])

Collective

## Input Parameters

- mat - the matrix object.

- pyname - full dotted Python name [package].module[.{class|function}]

## Options Database Key

- -mat_python_type pyname - python class

## See Also

Matrices, `Mat`, `MatType`, `MatCreate()`, `MatSetType()`, `MATPYTHON`, `PetscPythonInitialize()`

## Level

intermediate

## Location

src/mat/impls/python/pythonmat.c

## Examples

src/ksp/ksp/tutorials/ex100f.F90
src/ksp/ksp/tutorials/ex100.c

Index of all Mat routines
Table of Contents for all manual pages
Index of all manual pages