From 39f937660c7252cb356c13910ab63fc4ad0719ca Mon Sep 17 00:00:00 2001 From: Sanchali torpe Date: Sun, 18 Jan 2026 16:56:47 -0800 Subject: [PATCH] Clarify that cross() returns connections in default infinite mask --- csa/elementary.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/csa/elementary.py b/csa/elementary.py index 4d848b8..f3c5d2a 100644 --- a/csa/elementary.py +++ b/csa/elementary.py @@ -71,6 +71,22 @@ def ival (beg, end): # Cartesian product # def cross (set0, set1): + """ + Compute the Cartesian product of two sets. + + Note + ---- + The Cartesian product returned by `cross()` is not automatically + restricted to a finite mask. When visualized using `show()`, + connections may appear in the default (infinite) mask unless + explicitly multiplied with a finite mask. + + Example + ------- + # To obtain a bounded all-to-all connectivity pattern: + cross(A, B) * full(len(A), len(B)) + """ + return _cs.intervalSetMask (set0, set1) # Elementary masks