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))
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))
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))
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))