MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / diag

Method diag

lib/matplotlib/tri/_triinterpolate.py:1275–1280  ·  view source on GitHub ↗

Return the (dense) vector of the diagonal elements.

(self)

Source from the content-addressed store, hash-verified

1273
1274 @property
1275 def diag(self):
1276 """Return the (dense) vector of the diagonal elements."""
1277 in_diag = (self.rows == self.cols)
1278 diag = np.zeros(min(self.n, self.n), dtype=np.float64) # default 0.
1279 diag[self.rows[in_diag]] = self.vals[in_diag]
1280 return diag
1281
1282
1283def _cg(A, b, x0=None, tol=1.e-10, maxiter=1000):

Callers 5

_locateFunction · 0.80
__str__Method · 0.80
test_imshowMethod · 0.80
test_matshowMethod · 0.80
matshow.pyFile · 0.80

Calls

no outgoing calls

Tested by 2

test_imshowMethod · 0.64
test_matshowMethod · 0.64