88
99def generate_tiny_test_point_cloud ():
1010 """Generate a simple but valid point cloud with 3 points."""
11- pc = {keys .point : {'x' : {'type' : 'double' , 'data' : np .array ([1 , 2 , 3 ], dtype = np . float64 )},
12- 'y' : {'type' : 'double' , 'data' : np .array ([2 , 3 , 4 ], dtype = np . float64 )},
13- 'z' : {'type' : 'double' , 'data' : np .array ([3 , 4 , 5 ], dtype = np . float64 )}}}
11+ pc = {keys .point : {'x' : {'type' : 'double' , 'data' : np .array ([1 , 2 , 3 ], dtype = float )},
12+ 'y' : {'type' : 'double' , 'data' : np .array ([2 , 3 , 4 ], dtype = float )},
13+ 'z' : {'type' : 'double' , 'data' : np .array ([3 , 4 , 5 ], dtype = float )}}}
1414 return pc
1515
1616
@@ -21,9 +21,9 @@ class SimpleTestData(object):
2121 def get_point_cloud ():
2222 """Get the point cloud data."""
2323 # This simple_test_point cloud and the simple_test_header should be in sync. Some tests depend on it.
24- pc = {keys .point : {'x' : {'type' : 'double' , 'data' : np .array ([1 , 2 , 3 ], dtype = np . float64 )},
25- 'y' : {'type' : 'double' , 'data' : np .array ([20 , 30 , 40 ], dtype = np . float64 )},
26- 'z' : {'type' : 'double' , 'data' : np .array ([300 , 400 , 500 ], dtype = np . float64 )}}}
24+ pc = {keys .point : {'x' : {'type' : 'double' , 'data' : np .array ([1 , 2 , 3 ], dtype = float )},
25+ 'y' : {'type' : 'double' , 'data' : np .array ([20 , 30 , 40 ], dtype = float )},
26+ 'z' : {'type' : 'double' , 'data' : np .array ([300 , 400 , 500 ], dtype = float )}}}
2727 return pc
2828
2929 @staticmethod
@@ -64,10 +64,10 @@ class ComplexTestData(object):
6464 def get_point_cloud ():
6565 """Get the point cloud data."""
6666 # This complex_test_point cloud and the complex_test_header should be in sync. Some tests depend on it.
67- pc = {keys .point : {'x' : {'type' : 'double' , 'data' : np .array ([1 , 2 , 3 , 4 , 5 ], dtype = np . float )},
68- 'y' : {'type' : 'double' , 'data' : np .array ([2 , 3 , 4 , 5 , 6 ], dtype = np . float )},
69- 'z' : {'type' : 'double' , 'data' : np .array ([3 , 4 , 5 , 6 , 7 ], dtype = np . float )},
70- 'return' : {'type' : 'int' , 'data' : np .array ([1 , 1 , 2 , 2 , 1 ], dtype = np . int32 )}
67+ pc = {keys .point : {'x' : {'type' : 'double' , 'data' : np .array ([1 , 2 , 3 , 4 , 5 ], dtype = float )},
68+ 'y' : {'type' : 'double' , 'data' : np .array ([2 , 3 , 4 , 5 , 6 ], dtype = float )},
69+ 'z' : {'type' : 'double' , 'data' : np .array ([3 , 4 , 5 , 6 , 7 ], dtype = float )},
70+ 'return' : {'type' : 'int' , 'data' : np .array ([1 , 1 , 2 , 2 , 1 ], dtype = int )}
7171 },
7272 keys .point_cloud : {'offset' : {'type' : 'double' , 'data' : 12.1 }},
7373 keys .provenance : [{"module" : "filter" , "time" : str (dt .datetime (2018 , 1 , 18 , 16 , 1 , 0 ))},
@@ -131,14 +131,14 @@ def create_point_cloud(x, y, z, normalized_z=None):
131131 :param normalized_z: optional normalized z attribute values
132132 :return: point cloud object
133133 """
134- point_cloud = {keys .point : {'x' : {'type' : 'double' , 'data' : np .array (x , dtype = np . float )},
135- 'y' : {'type' : 'double' , 'data' : np .array (y , dtype = np . float )},
136- 'z' : {'type' : 'double' , 'data' : np .array (z , dtype = np . float )}},
134+ point_cloud = {keys .point : {'x' : {'type' : 'double' , 'data' : np .array (x , dtype = float )},
135+ 'y' : {'type' : 'double' , 'data' : np .array (y , dtype = float )},
136+ 'z' : {'type' : 'double' , 'data' : np .array (z , dtype = float )}},
137137 keys .point_cloud : {},
138138 keys .provenance : [{'time' : (dt .datetime (2018 , 1 , 18 , 16 , 1 , 0 )), 'module' : 'filter' }]}
139139 if normalized_z is not None :
140140 point_cloud [keys .point ][keys .normalized_height ] = {'type' : 'double' ,
141- 'data' : np .array (normalized_z , dtype = np . float )}
141+ 'data' : np .array (normalized_z , dtype = float )}
142142 return point_cloud
143143
144144
0 commit comments