2023-04-09 19:21:45 +00:00
|
|
|
import unittest
|
|
|
|
|
2023-04-12 18:31:58 +00:00
|
|
|
import numpy as np
|
|
|
|
|
2023-04-09 19:21:45 +00:00
|
|
|
|
|
|
|
class TestCase(unittest.TestCase):
|
|
|
|
def assertAllClose(self, x1, x2, atol=1e-7, rtol=1e-7):
|
|
|
|
np.testing.assert_allclose(x1, x2, atol=atol, rtol=rtol)
|
2023-04-19 04:18:20 +00:00
|
|
|
|
|
|
|
def assertAllEqual(self, x1, x2, decimal=3):
|
|
|
|
np.testing.assert_almost_equal(x1, x2, decimal=decimal)
|