MCPcopy Create free account
hub / github.com/NVIDIA/MinkowskiEngine / quantize

Function quantize

tests/python/network_speed.py:57–66  ·  view source on GitHub ↗
(coordinates)

Source from the content-addressed store, hash-verified

55
56
57def quantize(coordinates):
58 D = coordinates.size(1) - 1
59 coordinate_manager = ME.CoordinateManager(
60 D=D, coordinate_map_type=ME.CoordinateMapType.CPU
61 )
62 coordinate_map_key = ME.CoordinateMapKey(convert_to_int_list(1, D), "")
63 key, (unique_map, inverse_map) = coordinate_manager.insert_and_map(
64 coordinates, *coordinate_map_key.get_key()
65 )
66 return unique_map, inverse_map
67
68
69def load_file(file_name, voxel_size):

Callers 1

load_fileFunction · 0.70

Calls 5

insert_and_mapMethod · 0.95
get_keyMethod · 0.95
convert_to_int_listFunction · 0.90
CoordinateMapKeyMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected