code: def test_pham_weight_zero(get_covmats):
      """Setting one weight to almost 0 it's almost like not passing the mat"""
      n_matrices, n_channels, w_val = 5, 3, 2
      covmats = get_covmats(n_matrices, n_channels)
      w = w_val * np.ones(n_matrices)
      V, D = ajd_pham(covmats[1:], sample_weight=w[1:])
      w[0] = 1e-12
      Vw, Dw = ajd_pham(covmats, sample_weight=w)
      assert V == approx(Vw, rel=1e-4, abs=1e-8)
      assert D == approx(Dw[1:], rel=1e-4, abs=1e-8)
  
file_path: pyRiemann/tests/test_utils_ajd.py
imports: from numpy.testing import assert_array_equal
  import numpy
  import pytest
  from pytest import approx
  from pyriemann.utils.ajd import rjd, ajd_pham, uwedge
label_desc: Use image node_id 5 for calling a global function with example usage: test_pham_weight_zero(get_covmats) without return types