class_docstr: Jit-compatible helper to build blockwise vectors.
  Syntax is similar to :func:`torch.zeros` ::
  
      x = BlockVector((100, 20))
      x[..., 0:4] = x1
      x[..., 6:10] = x2
      x = x.as_tensor()
      assert x.shape == (100, 20)
class_docstr_tok: ["Jit-compatible","helper","to","build","blockwise","vectors",".","Syntax","is","similar","to",":","func",":","`","torch.zeros","`",":",":","x","=","BlockVector","(","(","100",",","20",")",")","x","[","...",",","0:4","]","=","x1","x","[","...",",","6:10","]","=","x2","x","=","x.as_tensor","(",")","assert","x.shape","==","(","100",",","20",")"]
code: def __init__(self, shape):
      self.shape = shape
      self.parts = {}
  
imports: import math
  from collections import OrderedDict, defaultdict
  from contextlib import contextmanager
  from functools import reduce
  import funsor.ops
  from funsor.affine import affine_inputs, extract_affine, is_affine
  from funsor.delta import Delta
  from funsor.domains import Real, Reals
  from funsor.interpretations import compress_gaussians
  from funsor.ops import AddOp, SubOp
  from funsor.tensor import Tensor, align_tensor, align_tensors
  from funsor.terms import Binary, Funsor, FunsorMeta, Number, Slice, Subs, Variable, eager, reflect
  from funsor.util import broadcast_shape, get_tracing_state, lazy_property
label_desc: Use image node_id 1 to create a new BlockVector object from inherited base classes: object with example: obj = BlockVector(shape)