class_docstr: Tests for the tanh normal distribution.
docstr: Test for expand function.
  
  Checks whether expand returns a distribution that has potentially a
  different batch size from the already existing distribution.
docstr_tok: ["Test","for","expand","function",".","Checks","whether","expand","returns","a","distribution","that","has","potentially","a","different","batch","size","from","the","already","existing","distribution","."]
code: def test_tanh_normal_expand(self):
      """Test for expand function.
  
      Checks whether expand returns a distribution that has potentially a
      different batch size from the already existing distribution.
  
      """
      mean = torch.zeros(1)
      std = torch.ones(1)
      dist = TanhNormal(mean, std)
      new_dist = dist.expand((2,))
      sample = new_dist.sample()
      assert sample.shape == torch.Size((2, 1))
  
file_path: garage/tests/garage/torch/distributions/test_tanh_normal_dist.py
imports: import torch
  from garage.torch.distributions import TanhNormal
label_desc: Use image node_id 5 for calling the TestBenchmarkTanhNormalDistribution obj's underlying member method code with example usage: obj.test_tanh_normal_expand() without return types