Example #1
0
 def test_mfarg_1(self):
     prop = create_prop()
     expected_out = [
         -0.925000000000000, -0.250000000000000, -0.425000000000000
     ]
     out = get_mfarg(self.ob_data, prop[1], 0, 0)
     np.testing.assert_allclose(expected_out, out)
Example #2
0
 def test_mfarg_4(self):
     prop = create_prop()
     expected_out = [
         -0.775000000000000, 0.200000000000000, -0.0250000000000000
     ]
     out = get_mfarg(self.ob_data, prop[4], 0, 0)
     np.testing.assert_allclose(expected_out, out)
Example #3
0
 def test_tmf(self):
     expected_out = self.get_expected_out()
     prop = create_prop()
     f = []
     for i in range(len(prop)):
         out = tmf(get_mfarg(self.ob_data, prop[i], 0, 0), prop[i].ftype, prop[i].fthr)
         f.append(out)
         # np.testing.assert_allclose(expected_out[i], np.around(out, decimals=0))
     print(*f, sep="\n")
Example #4
0
 def test_properties(self):
     obj_data = get_relpos(create_bound_boxes(), get_field_size())
     obj_prop = get_properties(obj_data, create_prop())
     for index, item in enumerate(obj_prop):
         np.testing.assert_allclose(self.obj_prop_expected[index],
                                    np.around(obj_prop[index], decimals=4))
Example #5
0
 def test_mfarg_7(self):
     prop = create_prop()
     expected_out = [0]
     out = get_mfarg(self.ob_data, prop[7], 0, 0)
     np.testing.assert_allclose(expected_out, out)