Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_in_positives():
mat = sp.csr_matrix(np.array([[0, 1], [1, 0]])).astype(np.float32)
assert not _lightfm_fast.__test_in_positives(0, 0, _lightfm_fast.CSRMatrix(mat))
assert _lightfm_fast.__test_in_positives(0, 1, _lightfm_fast.CSRMatrix(mat))
assert _lightfm_fast.__test_in_positives(1, 0, _lightfm_fast.CSRMatrix(mat))
assert not _lightfm_fast.__test_in_positives(1, 1, _lightfm_fast.CSRMatrix(mat))
def test_in_positives():
mat = sp.csr_matrix(np.array([[0, 1], [1, 0]])).astype(np.float32)
assert not _lightfm_fast.__test_in_positives(0, 0, _lightfm_fast.CSRMatrix(mat))
assert _lightfm_fast.__test_in_positives(0, 1, _lightfm_fast.CSRMatrix(mat))
assert _lightfm_fast.__test_in_positives(1, 0, _lightfm_fast.CSRMatrix(mat))
assert not _lightfm_fast.__test_in_positives(1, 1, _lightfm_fast.CSRMatrix(mat))