# EHY rectangular-uniformity test **Public verdict:** validated and exposed as `pysht.uniformity.ehy`. It is a pySHT-native addition with no SHT 0.1.9 crosswalk entry. ## Primary equations and hypotheses The fixed null is uniformity on the user-declared hyperrectangle. Coordinates are mapped affinely to the unit cube, where the null density is $f_0=1$. For intrinsic dimension $m$, let $v_m=\pi^{m/2}/\Gamma(m/2+1)$ and let $X_i^{(k)}$ be the $k$th nearest neighbor of $X_i$. The implementation follows EHY equations (1) and (4): $$ \xi_{n,J}^{(\alpha)}(X_i)= \sum_{k=1}^{J}\left\{v_m n \lVert X_i-X_i^{(k)}\rVert^m\right\}^{\alpha}, \qquad T_{n,J}^{(\alpha)}= \sum_{i=1}^n\xi_{n,J}^{(\alpha)}(X_i) f_0(X_i)^\alpha. $$ Thus `n_neighbors=J` means *all* first $J$ terms are summed. It never means only the $J$th distance. Theorem 1 and remarks (i), (iv), and (v) require $\alpha>0$, identify $\alpha=1$ as distribution-free and unusable for this test, and establish lower-tail rejection for $0<\alpha<1$ and upper-tail rejection for $\alpha>1$. The domain is $1\le J