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_memoryview_double_noconj(A, B):
if len(A) < len(B):
B = B[:len(A)]
else:
A = A[:len(B)]
assume(A is not None)
assume(B is not None)
numpy_result = A.dot(B)
result = dotv(A, B)
assert_allclose([numpy_result], result, atol=1e-3, rtol=1e-3)
def test_memoryview_float_noconj(A, B):
if len(A) < len(B):
B = B[:len(A)]
else:
A = A[:len(B)]
assume(A is not None)
assume(B is not None)
numpy_result = A.dot(B)
result = dotv(A, B)
assert_allclose([numpy_result], result, atol=1e-3, rtol=1e-3)