From 419c6bd2f9e9427f7de6974c86ea743434b03b1c Mon Sep 17 00:00:00 2001 From: Simeet Nayan Date: Wed, 23 Sep 2026 17:50:07 +0530 Subject: [PATCH] Contraction docs addition --- python/src/ops.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/python/src/ops.cpp b/python/src/ops.cpp index a36b63b3d6..fcb7efe189 100644 --- a/python/src/ops.cpp +++ b/python/src/ops.cpp @@ -746,6 +746,9 @@ void init_ops(nb::module_& m) { - All but the last two dimensions of each input are broadcast with one another using standard numpy-style broadcasting semantics. + Only inexact types are supported. The promoted type of ``a`` and ``b`` + must be floating point or complex. + Args: a (array): Input array or scalar. b (array): Input array or scalar. @@ -5815,6 +5818,9 @@ void init_ops(nb::module_& m) { Perform the Einstein summation convention on the operands. + Contractions are implemented with :func:`matmul` and have the same + requirements. + Args: subscripts (str): The Einstein summation convention equation. *operands (array): The input arrays.