code: def test_with_scalar_field_non_ndarray_data(self):
      # Transform and regrid vector (with no projection transform) with an
      # additional scalar field which is not a ndarray.
      expected_x_grid = np.array(
          [
              [-10.0, -5.0, 0.0, 5.0, 10.0],
              [-10.0, -5.0, 0.0, 5.0, 10.0],
              [-10.0, -5.0, 0.0, 5.0, 10.0],
          ]
      )
      expected_y_grid = np.array(
          [
              [5.0, 5.0, 5.0, 5.0, 5.0],
              [7.5, 7.5, 7.5, 7.5, 7.5],
              [10.0, 10.0, 10.0, 10.0, 10],
          ]
      )
      expected_u_grid = np.array(
          [
              [np.nan, 2.0, 3.0, 2.0, np.nan],
              [np.nan, 2.5, 3.5, 2.5, np.nan],
              [2.0, 3.0, 4.0, 3.0, 2.0],
          ]
      )
      expected_v_grid = np.array(
          [
              [np.nan, 0.8, 0.3, 0.8, np.nan],
              [np.nan, 2.675, 2.15, 2.675, np.nan],
              [5.5, 4.75, 4.0, 4.75, 5.5],
          ]
      )
      expected_s_grid = np.array(
          [
              [np.nan, 2.0, 3.0, 2.0, np.nan],
              [np.nan, 2.5, 3.5, 2.5, np.nan],
              [2.0, 3.0, 4.0, 3.0, 2.0],
          ]
      )
  
      src_crs = target_crs = ccrs.PlateCarree()
      (
          x_grid,
          y_grid,
          u_grid,
          v_grid,
          s_grid,
      ) = vec_trans.vector_scalar_to_grid(
          src_crs,
          target_crs,
          (5, 3),
          list(self.x),
          list(self.y),
          list(self.u),
          list(self.v),
          list(self.s),
      )
  
      assert_array_equal(x_grid, expected_x_grid)
      assert_array_equal(y_grid, expected_y_grid)
      assert_array_almost_equal(u_grid, expected_u_grid)
      assert_array_almost_equal(v_grid, expected_v_grid)
      assert_array_almost_equal(s_grid, expected_s_grid)
  
file_path: cartopy/lib/cartopy/tests/test_vector_transform.py
imports: import numpy
  from numpy.testing import assert_array_almost_equal, assert_array_equal
  import pytest
  import cartopy.crs
  import cartopy.vector_transform
label_desc: Use image node_id 5 for calling the Test_vector_scalar_to_grid obj's underlying member method code with example usage: obj.test_with_scalar_field_non_ndarray_data() without return types