def get_laplacian_kernel1d(
    kernel_size: int, *, device: Optional[Device] = None, dtype: Dtype = torch.float32
) -> Tensor:
    r"""Return the coefficients of a 1D Laplacian filter.

    Args:
        kernel_size: filter size. It should be odd and positive.
        device: tensor device desired to create the kernel
        dtype: tensor dtype desired to create the kernel

    Returns:
        1D tensor with laplacian filter coefficients.

    Shape:
        - Output: math:`(\text{kernel_size})`

    Examples:
        >>> get_laplacian_kernel1d(3)
        tensor([ 1., -2.,  1.])
        >>> get_laplacian_kernel1d(5)
        tensor([ 1.,  1., -4.,  1.,  1.])

    """
    # TODO: add default dtype as None when kornia relies on torch > 1.12

    _check_kernel_size(kernel_size)

    return laplacian_1d(kernel_size, device=device, dtype=dtype)
Return the coefficients of a 1D Laplacian filter.

    Args:
        kernel_size: filter size. It should be odd and positive.
        device: tensor device desired to create the kernel
        dtype: tensor dtype desired to create the kernel

    Returns:
        1D tensor with laplacian filter coefficients.

    Shape:
        - Output: math:`(\text{kernel_size})`

    Examples:
        >>> get_laplacian_kernel1d(3)
        tensor([ 1., -2.,  1.])
        >>> get_laplacian_kernel1d(5)
        tensor([ 1.,  1., -4.,  1.,  1.])

    
kornia/filters/kernels.py