MinkowskiEngine/MinkowskiCoordinateManager.py
def _get_coordinate_map_key(self, key_or_tensor_strides) -> CoordinateMapKey:
        r"""Helper function that retrieves the first coordinate map key for the given tensor stride."""
        assert isinstance(key_or_tensor_strides, CoordinateMapKey) or isinstance(
            key_or_tensor_strides, (Sequence, np.ndarray, torch.IntTensor, int)
        ), f"The input must be either a CoordinateMapKey or tensor_stride of type (int, list, tuple, array, Tensor). Invalid: {key_or_tensor_strides}"
        if isinstance(key_or_tensor_strides, CoordinateMapKey):
            # Do nothing and return the input
            return key_or_tensor_strides
        else:
            tensor_strides = convert_to_int_list(key_or_tensor_strides, self.D)
            keys = self._manager.get_coordinate_map_keys(tensor_strides)
            assert len(keys) > 0
            return keys[0]
r"""Helper function that retrieves the first coordinate map key for the given tensor stride.
r"""Helper function that retrieves the first coordinate map key for the given tensor stride.
r " " " Helper function that retrieves the first coordinate map key for the given tensor stride .
def _get_coordinate_map_key(self, key_or_tensor_strides) -> CoordinateMapKey:
        assert isinstance(key_or_tensor_strides, CoordinateMapKey) or isinstance(
            key_or_tensor_strides, (Sequence, np.ndarray, torch.IntTensor, int)
        ), f"The input must be either a CoordinateMapKey or tensor_stride of type (int, list, tuple, array, Tensor). Invalid: {key_or_tensor_strides}"
        if isinstance(key_or_tensor_strides, CoordinateMapKey):
            return key_or_tensor_strides
        else:
            tensor_strides = convert_to_int_list(key_or_tensor_strides, self.D)
            keys = self._manager.get_coordinate_map_keys(tensor_strides)
            assert len(keys) > 0
            return keys[0]
def _get_coordinate_map_key ( self , key_or_tensor_strides ) -> CoordinateMapKey : assert isinstance ( key_or_tensor_strides , CoordinateMapKey ) or isinstance ( key_or_tensor_strides , ( Sequence , np . ndarray , torch . IntTensor , int ) ) , f"The input must be either a CoordinateMapKey or tensor_stride of type (int, list, tuple, array, Tensor). Invalid: {key_or_tensor_strides}" if isinstance ( key_or_tensor_strides , CoordinateMapKey ) : return key_or_tensor_strides else : tensor_strides = convert_to_int_list ( key_or_tensor_strides , self . D ) keys = self . _manager . get_coordinate_map_keys ( tensor_strides ) assert len ( keys ) > 0 return keys [ 0 ]
r"""Helper function that retrieves the first coordinate map key for the given tensor stride.
r " " " Helper function that retrieves the first coordinate map key for the given tensor stride .
r"""Helper function that retrieves the first coordinate map key for the given tensor stride.""" # Do nothing and return the input
self
key_or_tensor_strides