code: def test_from_6x6_to_21x1():
      """Test conversion to Voigt notation."""
      V = np.arange(1, 22)[:, np.newaxis].astype(float)
      T = np.array(
          (
              [
                  1,
                  4.24264069,
                  3.53553391,
                  4.94974747,
                  5.65685425,
                  6.36396103,
              ],
              [
                  4.24264069,
                  2,
                  2.82842712,
                  7.07106781,
                  7.77817459,
                  8.48528137,
              ],
              [
                  3.53553391,
                  2.82842712,
                  3,
                  9.19238816,
                  9.89949494,
                  10.60660172,
              ],
              [
                  4.94974747,
                  7.07106781,
                  9.19238816,
                  16,
                  13.43502884,
                  14.8492424,
              ],
              [
                  5.65685425,
                  7.77817459,
                  9.89949494,
                  13.43502884,
                  17,
                  14.14213562,
              ],
              [
                  6.36396103,
                  8.48528137,
                  10.60660172,
                  14.8492424,
                  14.14213562,
                  18,
              ],
          )
      )
      npt.assert_array_almost_equal(qti.from_6x6_to_21x1(T), V)
      npt.assert_array_almost_equal(
          qti.from_6x6_to_21x1(qti.from_21x1_to_6x6(V)), V
      )
      npt.assert_raises(ValueError, qti.from_6x6_to_21x1, T[0:1])
      npt.assert_warns(Warning, qti.from_6x6_to_21x1, T + np.arange(6))
  
imports: import numpy
  import numpy.testing
  import dipy.reconst.qti
  from dipy.core.gradients import gradient_table
  from dipy.sims.voxel import vec2vec_rotmat
  from dipy.core.sphere import disperse_charges, HemiSphere
  from dipy.reconst.dti import fractional_anisotropy
  from dipy.testing.decorators import set_random_number_generator
  from dipy.utils.optpkg import optional_package
label_desc: Use image node_id 3 for calling a global function with example usage: test_from_6x6_to_21x1() without return types