### Navigation

- index
- modules |
- modules |
- next |
- previous |
- SciPy v0.12 Reference Guide (DRAFT) »
- Sparse matrices (`scipy.sparse`) »
- scipy.sparse.dok_matrix »

# scipy.sparse.dok_matrix.setdefault

`dok_matrix.``setdefault`(k[, d]) → D.get(k,d), also set D[k]=d if k not in D

### Navigation

- index
- modules |
- modules |
- next |
- previous |
- SciPy v0.12 Reference Guide (DRAFT) »
- Sparse matrices (`scipy.sparse`) »
- scipy.sparse.dok_matrix »