code: def test_eudx_both_directions_errors():
      # Test error conditions for both directions function
      sphere = default_sphere
      seed = np.zeros(3, np.float64)
      qa = np.zeros((4, 5, 6, 7), np.float64)
      ind = qa.copy()
      # All of seed, qa, ind, odf_vertices must be C-contiguous.  Check by
      # passing in versions that aren't C contiguous
      assert_raises(
          ValueError,
          eudx_both_directions,
          stepped_1d(seed),
          0,
          qa,
          ind,
          sphere.vertices,
          0.5,
          0.1,
          1.0,
          1.0,
          2,
      )
      assert_raises(
          ValueError,
          eudx_both_directions,
          seed,
          0,
          qa[..., ::2],
          ind,
          sphere.vertices,
          0.5,
          0.1,
          1.0,
          1.0,
          2,
      )
      assert_raises(
          ValueError,
          eudx_both_directions,
          seed,
          0,
          qa,
          ind[..., ::2],
          sphere.vertices,
          0.5,
          0.1,
          1.0,
          1.0,
          2,
      )
      assert_raises(
          ValueError,
          eudx_both_directions,
          seed,
          0,
          qa,
          ind,
          sphere.vertices[::2],
          0.5,
          0.1,
          1.0,
          1.0,
          2,
      )
  
imports: import numpy
  from dipy.data import default_sphere
  from dipy.tracking.propspeed import ndarray_offset, eudx_both_directions
  from numpy.testing import assert_equal, assert_raises
label_desc: Use image node_id 3 for calling a global function with example usage: test_eudx_both_directions_errors() without return types