Commit 7b47c0f3 authored by Dr. Felix Tobias Schindler's avatar Dr. Felix Tobias Schindler
Browse files

[pymortests] add equality assertion for IstlVector

parent 4ca01fa0
......@@ -20,6 +20,21 @@ is_equal_ignored_attributes = \
is_equal_dispatch_table = {}
if config.HAVE_DUNEGDT:
from import IstlVector
def _assert_IstlVector_equal(first, second):
if not isinstance(first, IstlVector):
return False
if not isinstance(second, IstlVector):
return False
if not len(first) == len(second):
return False
assert_is_equal(np.array(first, copy=False), np.array(second, copy=False))
return True
is_equal_dispatch_table[IstlVector] = _assert_IstlVector_equal
def func_with_closure_generator():
x = 42
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment