code: def test_grid():
      # USGS Professional Paper 1395, pg 151, Table 22
      globe = ccrs.Globe(
          ellipse=None, semimajor_axis=1.0, semiminor_axis=1.0
      )
      ortho = ccrs.Orthographic(globe=globe)
      geodetic = ortho.as_geodetic()
  
      other_args = {"a=1.0", "b=1.0", "lon_0=0.0", "lat_0=0.0"}
      check_proj_params("ortho", ortho, other_args)
  
      assert_almost_equal(np.array(ortho.x_limits), [-0.99999, 0.99999])
      assert_almost_equal(np.array(ortho.y_limits), [-0.99999, 0.99999])
  
      lats, lons = np.mgrid[0:100:10, 0:100:10].reshape((2, -1))
      expected_x = np.array(
          [
              [
                  0.0000,
                  0.0000,
                  0.0000,
                  0.0000,
                  0.0000,
                  0.0000,
                  0.0000,
                  0.0000,
                  0.0000,
                  0.0000,
              ],
              [
                  0.0000,
                  0.0302,
                  0.0594,
                  0.0868,
                  0.1116,
                  0.1330,
                  0.1504,
                  0.1632,
                  0.1710,
                  0.1736,
              ],
              [
                  0.0000,
                  0.0594,
                  0.1170,
                  0.1710,
                  0.2198,
                  0.2620,
                  0.2962,
                  0.3214,
                  0.3368,
                  0.3420,
              ],
              [
                  0.0000,
                  0.0868,
                  0.1710,
                  0.2500,
                  0.3214,
                  0.3830,
                  0.4330,
                  0.4698,
                  0.4924,
                  0.5000,
              ],
              [
                  0.0000,
                  0.1116,
                  0.2198,
                  0.3214,
                  0.4132,
                  0.4924,
                  0.5567,
                  0.6040,
                  0.6330,
                  0.6428,
              ],
              [
                  0.0000,
                  0.1330,
                  0.2620,
                  0.3830,
                  0.4924,
                  0.5868,
                  0.6634,
                  0.7198,
                  0.7544,
                  0.7660,
              ],
              [
                  0.0000,
                  0.1504,
                  0.2962,
                  0.4330,
                  0.5567,
                  0.6634,
                  0.7500,
                  0.8138,
                  0.8529,
                  0.8660,
              ],
              [
                  0.0000,
                  0.1632,
                  0.3214,
                  0.4698,
                  0.6040,
                  0.7198,
                  0.8138,
                  0.8830,
                  0.9254,
                  0.9397,
              ],
              [
                  0.0000,
                  0.1710,
                  0.3368,
                  0.4924,
                  0.6330,
                  0.7544,
                  0.8529,
                  0.9254,
                  0.9698,
                  0.9848,
              ],
              [
                  0.0000,
                  0.1736,
                  0.3420,
                  0.5000,
                  0.6428,
                  0.7660,
                  0.8660,
                  0.9397,
                  0.9848,
                  1.0000,
              ],
          ]
      )[::-1, :].ravel()
      expected_y = np.array(
          [
              1.0000,
              0.9848,
              0.9397,
              0.8660,
              0.7660,
              0.6428,
              0.5000,
              0.3420,
              0.1736,
              0.0000,
          ]
      )[::-1].repeat(10)
  
      # Test all quadrants; they are symmetrical.
      for lon_sign in [1, -1]:
          for lat_sign in [1, -1]:
              result = ortho.transform_points(
                  geodetic, lon_sign * lons, lat_sign * lats
              )
              assert_almost_equal(
                  result[:, 0], lon_sign * expected_x, decimal=4
              )
              assert_almost_equal(
                  result[:, 1], lat_sign * expected_y, decimal=4
              )
  
file_path: cartopy/lib/cartopy/tests/crs/test_orthographic.py
imports: import numpy
  from numpy.testing import assert_almost_equal
  import pytest
  import cartopy.crs
  from .helpers import check_proj_params
label_desc: Use image node_id 6 for calling a global function with example usage: test_grid() without return types