pygsti.tools.matrixtools.sparse_equal#
- sparse_equal(a, b, atol=1e-08)#
Checks whether two Scipy sparse matrices are (almost) equal.
- Parameters:
a (scipy.sparse matrix) – First matrix.
b (scipy.sparse matrix) – Second matrix.
atol (float, optional) – The tolerance to use, passed to numpy.allclose, when comparing the elements of a and b.
- Return type:
bool