gunjan@gunjan-VirtualBox:/Desktop/dnnCompiler/test/swig$ python3 tensorDetailedOperators.py -v
test_Assignment_Add_bool_tensor_bool_scalar (__main__.tensorDetailedOperatorsTest) ... ok
test_Assignment_Add_bool_tensor_bool_tensor (__main__.tensorDetailedOperatorsTest) ... ok
test_Assignment_Add_double_tensor_double_tensor (__main__.tensorDetailedOperatorsTest) ... FAIL
swig/python detected a memory leak of type 'std::vector< double,std::allocator< double > > *', no destructor found.
test_Assignment_Add_float_tensor_bool_scalar (__main__.tensorDetailedOperatorsTest) ... ok
test_Assignment_Add_float_tensor_float_scalar (__main__.tensorDetailedOperatorsTest) ... ok
test_Assignment_Add_float_tensor_float_tensor (__main__.tensorDetailedOperatorsTest) ... ok
test_Assignment_Add_float_tensor_int_scalar (__main__.tensorDetailedOperatorsTest) ... ok
test_Assignment_Add_int_tensor_int_scalar (__main__.tensorDetailedOperatorsTest) ... ok
test_Assignment_Add_int_tensor_int_tensor (__main__.tensorDetailedOperatorsTest) ... ok
test_Assignment_Sub_float_tensor_bool_scalar (__main__.tensorDetailedOperatorsTest) ... ok
test_Assignment_Sub_float_tensor_float_scalar (__main__.tensorDetailedOperatorsTest) ... ok
test_Assignment_Sub_float_tensor_float_tensor (__main__.tensorDetailedOperatorsTest) ... ok
test_Assignment_Sub_float_tensor_int_scalar (__main__.tensorDetailedOperatorsTest) ... ok
test_Assignment_Sub_int_tensor_int_scalar (__main__.tensorDetailedOperatorsTest) ... ok
test_Assignment_Sub_int_tensor_int_tensor (__main__.tensorDetailedOperatorsTest) ... ok
======================================================================
FAIL: test_Assignment_Add_double_tensor_double_tensor (__main__.tensorDetailedOperatorsTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "tensorDetailedOperators.py", line 225, in test_Assignment_Add_double_tensor_double_tensor
np.testing.assert_array_equal(temp_np, np.array(temp_dc.data()))
File "/home/gunjan/.local/lib/python3.6/site-packages/numpy/testing/_private/utils.py", line 913, in assert_array_equal
verbose=verbose, header='Arrays are not equal')
File "/home/gunjan/.local/lib/python3.6/site-packages/numpy/testing/_private/utils.py", line 836, in assert_array_compare
raise AssertionError(msg)
AssertionError:
Arrays are not equal
Mismatch: 100%
x: array([ 5., 7., 9., 11., 13.])
y: array(<Swig Object of type 'std::vector< double,std::allocator< double > > *' at 0x7f14578c1650>,
dtype=object)
----------------------------------------------------------------------
Ran 15 tests in 0.010s
FAILED (failures=1)
test / swig / tensorAssignmentOperators.py (Line No. 220, 380, 554)
Gets output error like this: