code: def _check_dimensions(X, Cref):
      n_1, n_2 = X.shape[-2:]
      n_3, n_4 = Cref.shape
      if not (n_1 == n_2 == n_3 == n_4):
          raise ValueError("Inputs have incompatible dimensions.")
  
file_path: pyRiemann/pyriemann/utils/tangentspace.py
imports: import numpy
  from .base import sqrtm, invsqrtm, logm, expm
  from .mean import mean_covariance
label_desc: Use image node_id 1 for calling a global function with example usage: _check_dimensions(X, Cref) without return types