예제 #1
0
 def test_to_list(self):
     """
     (SourceConversion) to list
     """
     s = Source([[10, 10], [10, 20]], values=[1.0, 2.0])
     getattr(s, "center")
     assert (isinstance(s.tolist().center, list))
     getattr(s, "bbox")
     assert (isinstance(s.tolist().bbox, list))
예제 #2
0
 def test_to_list(self):
     """
     (SourceConversion) to list
     """
     s = Source([[10, 10], [10, 20]], values=[1.0, 2.0])
     getattr(s, "center")
     assert(isinstance(s.tolist().center, list))
     getattr(s, "bbox")
     assert(isinstance(s.tolist().bbox, list))
예제 #3
0
 def test_to_array(self):
     """
     (SourceConversion) to array
     """
     s = Source([[10, 10], [10, 20]], values=[1.0, 2.0])
     assert(isinstance(s.toarray().center, ndarray))
     assert(isinstance(s.tolist().toarray().center, ndarray))
     assert(isinstance(s.tolist().toarray().bbox, ndarray))
예제 #4
0
 def test_to_array(self):
     """
     (SourceConversion) to array
     """
     s = Source([[10, 10], [10, 20]], values=[1.0, 2.0])
     assert (isinstance(s.toarray().center, ndarray))
     assert (isinstance(s.tolist().toarray().center, ndarray))
     assert (isinstance(s.tolist().toarray().bbox, ndarray))