docstr: Hessian is not vectorized by default in torch, tf and autograd.
docstr_tok: ["Hessian","is","not","vectorized","by","default","in","torch",",","tf","and","autograd","."]
code: def test_hessian_vec(self):
      """Hessian is not vectorized by default in torch, tf and autograd."""
      radius = 4.0
      dim = 2
  
      points = gs.array([[gs.pi / 3, gs.pi], [gs.pi / 4, gs.pi / 2]])
      thetas = points[:, 0]
      phis = points[:, 1]
      hessian_1ij = gs.autodiff.hessian_vec(
          _first_component_of_sphere_immersion_scalar
      )(points)
  
      expected_1ij = gs.stack(
          [
              radius
              * gs.array(
                  [
                      [
                          -gs.sin(theta) * gs.cos(phi),
                          -gs.cos(theta) * gs.sin(phi),
                      ],
                      [
                          -gs.cos(theta) * gs.sin(phi),
                          -gs.sin(theta) * gs.cos(phi),
                      ],
                  ]
              )
              for theta, phi in zip(thetas, phis)
          ],
          axis=0,
      )
  
      self.assertAllClose(hessian_1ij.shape, (2, dim, dim))
      self.assertAllClose(hessian_1ij.shape, expected_1ij.shape)
      self.assertAllClose(hessian_1ij, expected_1ij)
  
imports: import warnings
  import numpy
  import pytest
  import geomstats.backend
  from geomstats.geometry.grassmannian import Grassmannian
  from geomstats.geometry.special_euclidean import SpecialEuclidean
  from geomstats.test.test_case import TestCase, autograd_and_torch_only, autograd_only, np_only
label_desc: Use image node_id 22 for calling the TestAutodiff obj's underlying member method code with example usage: obj.test_hessian_vec() without return types