MinkowskiEngine/MinkowskiCoordinateManager.py
def insert_field(
        self,
        coordinates: torch.Tensor,
        tensor_stride: Sequence,
        string_id: str = "",
    ) -> Tuple[CoordinateMapKey, Tuple[torch.IntTensor, torch.IntTensor]]:
        r"""create a new coordinate map and returns

        :attr:`coordinates`: `torch.FloatTensor` (`CUDA` if coordinate_map_type
        == `CoordinateMapType.GPU`) that defines the coordinates.

        :attr:`tensor_stride` (`list`): a list of `D` elements that defines the
        tensor stride for the new order-`D + 1` sparse tensor.


        Example::

           >>> manager = CoordinateManager(D=1)
           >>> coordinates = torch.FloatTensor([[0, 0.1], [0, 2.3], [0, 1.2], [0, 2.4]])
           >>> key, (unique_map, inverse_map) = manager.insert(coordinates, [1])
           >>> print(key) # key is tensor_stride, string_id [1]:""
           >>> torch.all(coordinates[unique_map] == manager.get_coordinates(key)) # True
           >>> torch.all(coordinates == coordinates[unique_map][inverse_map]) # True

        """
        return self._manager.insert_field(coordinates, tensor_stride, string_id)
r"""create a new coordinate map and returns

        :attr:`coordinates`: `torch.FloatTensor` (`CUDA` if coordinate_map_type
        == `CoordinateMapType.GPU`) that defines the coordinates.

        :attr:`tensor_stride` (`list`): a list of `D` elements that defines the
        tensor stride for the new order-`D + 1` sparse tensor.


        Example::

           >>> manager = CoordinateManager(D=1)
           >>> coordinates = torch.FloatTensor([[0, 0.1], [0, 2.3], [0, 1.2], [0, 2.4]])
           >>> key, (unique_map, inverse_map) = manager.insert(coordinates, [1])
           >>> print(key) # key is tensor_stride, string_id [1]:""
           >>> torch.all(coordinates[unique_map] == manager.get_coordinates(key)) # True
           >>> torch.all(coordinates == coordinates[unique_map][inverse_map]) # True

        
r"""create a new coordinate map and returns
r " " " create a new coordinate map and returns
def insert_field(
        self,
        coordinates: torch.Tensor,
        tensor_stride: Sequence,
        string_id: str = "",
    ) -> Tuple[CoordinateMapKey, Tuple[torch.IntTensor, torch.IntTensor]]:
        return self._manager.insert_field(coordinates, tensor_stride, string_id)
def insert_field ( self , coordinates : torch . Tensor , tensor_stride : Sequence , string_id : str = "" , ) -> Tuple [ CoordinateMapKey , Tuple [ torch . IntTensor , torch . IntTensor ] ] : return self . _manager . insert_field ( coordinates , tensor_stride , string_id )
r"""create a new coordinate map and returns
r " " " create a new coordinate map and returns
r"""create a new coordinate map and returns

        :attr:`coordinates`: `torch.FloatTensor` (`CUDA` if coordinate_map_type
        == `CoordinateMapType.GPU`) that defines the coordinates.

        :attr:`tensor_stride` (`list`): a list of `D` elements that defines the
        tensor stride for the new order-`D + 1` sparse tensor.


        Example::

           >>> manager = CoordinateManager(D=1)
           >>> coordinates = torch.FloatTensor([[0, 0.1], [0, 2.3], [0, 1.2], [0, 2.4]])
           >>> key, (unique_map, inverse_map) = manager.insert(coordinates, [1])
           >>> print(key) # key is tensor_stride, string_id [1]:""
           >>> torch.all(coordinates[unique_map] == manager.get_coordinates(key)) # True
           >>> torch.all(coordinates == coordinates[unique_map][inverse_map]) # True

        """
self
coordinates
torch.Tensor
tensor_stride
Sequence
string_id
str
attr
`coordinates`: `torch.FloatTensor` (`CUDA` if coordinate_map_type
`CoordinateMapType.GPU`) that defines the coordinates.
` coordinates ` : ` torch . FloatTensor ` ( ` CUDA ` if coordinate_map_type ` CoordinateMapType . GPU ` ) that defines the coordinates .
attr
`tensor_stride` (`list`): a list of `D` elements that defines the
tensor stride for the new order-`D + 1` sparse tensor.



>>> manager = CoordinateManager(D=1)
>>> coordinates = torch.FloatTensor([[0, 0.1], [0, 2.3], [0, 1.2], [0, 2.4]])
>>> key, (unique_map, inverse_map) = manager.insert(coordinates, [1])
>>> print(key) # key is tensor_stride, string_id [1]:""
>>> torch.all(coordinates[unique_map] == manager.get_coordinates(key)) # True
>>> torch.all(coordinates == coordinates[unique_map][inverse_map]) # True
` tensor_stride ` ( ` list ` ) : a list of ` D ` elements that defines the tensor stride for the new order - ` D + 1 ` sparse tensor . >>> manager = CoordinateManager ( D = 1 ) >>> coordinates = torch . FloatTensor ( [[ 0 0 . 1 ] [ 0 2 . 3 ] [ 0 1 . 2 ] [ 0 2 . 4 ]] ) >>> key ( unique_map inverse_map ) = manager . insert ( coordinates [ 1 ] ) >>> print ( key ) # key is tensor_stride string_id [ 1 ] : " " >>> torch . all ( coordinates [ unique_map ] == manager . get_coordinates ( key )) # True >>> torch . all ( coordinates == coordinates [ unique_map ] [ inverse_map ] ) # True