Jan Petykiewicz
8fc96c13ab
- move generalizable fixtures out into conftest.py - move some other functions out to utils - fix test_poynting_planes() for fdtd
12 lines
408 B
Python
12 lines
408 B
Python
import numpy
|
|
|
|
|
|
def assert_fields_close(x, y, *args, **kwargs):
|
|
numpy.testing.assert_allclose(x, y, verbose=False,
|
|
err_msg='Fields did not match:\n{}\n{}'.format(numpy.rollaxis(x, -1),
|
|
numpy.rollaxis(y, -1)), *args, **kwargs)
|
|
|
|
def assert_close(x, y, *args, **kwargs):
|
|
numpy.testing.assert_allclose(x, y, *args, **kwargs)
|
|
|