code: def test_length_one_axis(self):
      # gh-5890, gh-9524 : length-1 axis is legal for method='linear'.
      # Along the axis it's linear interpolation; away from the length-1
      # axis, it's an extrapolation, so fill_value should be used.
  
      values = cp.array([[0.1, 1, 10]])
      xi = cp.array([[1, 2.2], [1, 3.2], [1, 3.8]])
  
      res = interpn(([1], [2, 3, 4]), values, xi)
      wanted = [
          0.9 * 0.2 + 0.1,  # on [2, 3) it's 0.9*(x-2) + 0.1
          9 * 0.2 + 1,  # on [3, 4] it's 9*(x-3) + 1
          9 * 0.8 + 1,
      ]
  
      assert_allclose(res, wanted, atol=1e-15)
  
      # check extrapolation
      xi = cp.array([[1.1, 2.2], [1.5, 3.2], [-2.3, 3.8]])
      res = interpn(
          ([1], [2, 3, 4]),
          values,
          xi,
          bounds_error=False,
          fill_value=None,
      )
  
      assert_allclose(res, wanted, atol=1e-15)
  
imports: import pytest
  import cupy
  from cupy.testing import assert_allclose, assert_array_equal, assert_array_almost_equal
  from cupy_backends.cuda.api import runtime
  from pytest import raises
  from cupyx.scipy.interpolate import RegularGridInterpolator, interpn
label_desc: Use image node_id 13 for calling the TestInterpN obj's underlying member method code with example usage: obj.test_length_one_axis() without return types