# MatSeqAIJGetMaxRowNonzeros
returns the maximum number of nonzeros in any row 
## Synopsis
```
#include "petscmat.h" 
PetscErrorCode MatSeqAIJGetMaxRowNonzeros(Mat A, PetscInt *nz)
```
Not Collective


## Input Parameter

- ***mat -*** a `MATSEQAIJ` matrix



## Output Parameter

- ***nz -*** the maximum number of nonzeros in any row





## See Also
 `MatSeqAIJRestoreArray()`, `MatSeqAIJGetArrayF90()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/mat/impls/aij/seq/aij.c.html#MatSeqAIJGetMaxRowNonzeros">src/mat/impls/aij/seq/aij.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/mat/impls/aij/seq/aij.c)


[Index of all Mat routines](index.md)  
[Table of Contents for all manual pages](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
