Consider a non-interacting superconducting Hamiltonian in an arbitrary dimension. This is most conveniently expressed in terms of Majorana modes, which are defined as $$\gamma_{2n-1} = c_n + c_n^\dagger \quad \textrm{ and } \quad\gamma_{2n} = -i \left( c_n - i c_n^\dagger \right)$$ for every complex fermionic mode $c_n$. For convenience we label $n = 1, 2, \cdots N$ where $N$ is our number of sites, but I am not presuming a one-dimensional structure (i.e. I do not enforce a notion of locality with respect to this labeling). A generic Hamiltonian is then written as $$ H = i \sum_{n,m} \gamma_n A_{nm} \gamma_m $$ where $A \in \mathbb R^{2N}\times \mathbb R^{2N}$ is anti-symmetric: $A^T = - A$.
Requiring a gap above the ground state is equivalent to demanding that $\det A\neq 0$. (Indeed: the positive eigenvalues of $A$ tell us the single-particle excitation energies.) But in that case the sign of the Pfaffian of $A$ is a well-defined quantity (i.e. $\frac{\textrm{pf} A}{\sqrt{\det A}}$).
This seemingly gives a topological $\mathbb Z_2$ invariant, independent of dimensionality! But this must be wrong, since the classification of non-interacting topological insulators/superconductors tells us this class of Hamiltonians (`class D') only has a $\mathbb Z_2$ invariant when the dimension of space is $d = 1 \mod 8$.