{"library":"pykeops","title":"pykeops","description":"PyKeOps is a Python package providing bindings to the KeOps library, which enables efficient computation of kernel operations on CPUs and GPUs with automatic differentiation and without memory overflows. It is widely used in geometry processing, shape analysis, and machine learning for large-scale distance and kernel computations. Current version is 2.3, with active development on GitHub.","language":"python","status":"active","last_verified":"Mon Apr 27","install":{"commands":["pip install pykeops"],"cli":null},"imports":["from pykeops.torch import LazyTensor","from pykeops.torch import Genred"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import torch\nfrom pykeops.torch import LazyTensor\n\n# Create sample data\nx = torch.randn(1000, 3).cuda()\ny = torch.randn(2000, 3).cuda()\n\n# Define LazyTensors\nX = LazyTensor(x[:, None, :])  # (1000, 1, 3)\nY = LazyTensor(y[None, :, :])  # (1, 2000, 3)\n\n# Compute pairwise distances squared\nD = ((X - Y) ** 2).sum(2)  # Symbolic reduction\n\n# Compute softmin (log-sum-exp) with Gaussian kernel\nK = (-D).exp()\nresult = K.sum(1)  # (1000,) actually returns a LazyTensor, evaluate with .detach()\nprint(result.detach())","lang":"python","description":"Compute pairwise Gaussian kernel sum using LazyTensors for memory-efficient reduction.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}