class_docstr: Linear Elliptical Slice Sampler.
  
  Ideas:
  - Add batch support, broadcasting over parallel chains.
  - Optimize computations if possible, potentially with torch.compile.
  - Extend fixed features constraint to general linear equality constraints.
class_docstr_tok: ["Linear","Elliptical","Slice","Sampler",".","Ideas",":","-","Add","batch","support",",","broadcasting","over","parallel","chains",".","-","Optimize","computations","if","possible",",","potentially","with","torch.compile",".","-","Extend","fixed","features","constraint","to","general","linear","equality","constraints","."]
docstr: Draw the rotation angle.
  
  Args:
      nu: A `d x 1`-dim tensor (the "new" direction, drawn from N(0, I)).
  
  Returns:
      A `1`-dim Tensor containing the rotation angle (radians).
docstr_tok: ["Draw","the","rotation","angle",".","Args",":","nu",":","A","`","d","x","1","`","-dim","tensor","(","the","``","new","''","direction",",","drawn","from","N","(","0",",","I",")",")",".","Returns",":","A","`","1","`","-dim","Tensor","containing","the","rotation","angle","(","radians",")","."]
code: def _draw_angle(self, nu: Tensor) -> Tensor:
      r"""Draw the rotation angle.
  
      Args:
          nu: A `d x 1`-dim tensor (the "new" direction, drawn from N(0, I)).
  
      Returns:
          A `1`-dim Tensor containing the rotation angle (radians).
      """
      rot_angle, rot_slices = self._find_rotated_intersections(nu)
      rot_lengths = rot_slices[:, 1] - rot_slices[:, 0]
      cum_lengths = torch.cumsum(rot_lengths, dim=0)
      cum_lengths = torch.cat((self._zero, cum_lengths), dim=0)
      rnd_angle = cum_lengths[-1] * torch.rand(
          1, device=cum_lengths.device, dtype=cum_lengths.dtype
      )
      idx = torch.searchsorted(cum_lengths, rnd_angle) - 1
      return (rot_slices[idx, 0] + rnd_angle + rot_angle) - cum_lengths[
          idx
      ]
  
imports: from __future__ import annotations
  import math
  from typing import List, Optional, Tuple, Union
  import torch
  from botorch.utils.sampling import PolytopeSampler
  from torch import Tensor
label_desc: Use image node_id 7 for calling the LinearEllipticalSliceSampler obj's underlying member method code with example usage: obj._draw_angle(nu) and returns: unknown