code: def test_transform_points():
      """
      Mostly tests the workaround for a specific problem.
      Problem report in: https://github.com/SciTools/cartopy/issues/232
      Fix covered in: https://github.com/SciTools/cartopy/pull/277
      """
  
      # these always worked
      result = _CRS_ROB.transform_points(
          _CRS_PC, np.array([35.0]), np.array([70.0])
      )
      assert_array_almost_equal(
          result, [[2376187.2182271, 7275318.1162980, 0]]
      )
  
      result = _CRS_ROB.transform_points(
          _CRS_PC, np.array([35.0]), np.array([70.0]), np.array([0.0])
      )
      assert_array_almost_equal(
          result, [[2376187.2182271, 7275318.1162980, 0]]
      )
  
      # this always did something, but result has altered
      result = _CRS_ROB.transform_points(
          _CRS_PC, np.array([np.nan]), np.array([70.0])
      )
      assert np.all(np.isnan(result))
  
      # this used to crash + is now fixed
      result = _CRS_ROB.transform_points(
          _CRS_PC, np.array([35.0]), np.array([np.nan])
      )
      assert np.all(np.isnan(result))
  
      # multipoint case
      x = np.array([10.0, 21.0, 0.0, 77.7, np.nan, 0.0])
      y = np.array([10.0, np.nan, 10.0, 77.7, 55.5, 0.0])
      z = np.array([10.0, 0.0, 0.0, np.nan, 55.5, 0.0])
      expect_result = np.array(
          [
              [9.40422591e05, 1.06952091e06, 1.00000000e01],
              [11.1, 11.2, 11.3],
              [0.0, 1069520.91213902, 0.0],
              [22.1, 22.2, 22.3],
              [33.1, 33.2, 33.3],
              [0.0, 0.0, 0.0],
          ]
      )
      result = _CRS_ROB.transform_points(_CRS_PC, x, y, z)
      assert result.shape == (6, 3)
      assert np.all(np.isnan(result[[1, 3, 4], :]))
      result[[1, 3, 4], :] = expect_result[[1, 3, 4], :]
      assert not np.any(np.isnan(result))
      assert np.allclose(result, expect_result)
  
file_path: cartopy/lib/cartopy/tests/crs/test_robinson.py
imports: import numpy
  from numpy.testing import assert_almost_equal, assert_array_almost_equal
  import pytest
  import cartopy.crs
  from .helpers import check_proj_params
label_desc: Use image node_id 8 for calling a global function with example usage: test_transform_points() without return types