class_docstr: Interpolate data defined on a rectilinear grid with even or uneven spacing.
  Produces similar results to scipy RegularGridInterpolator or interp2d
  in 'linear' mode.
  
  Taken from https://github.com/sbarratt/torch_interpolations
class_docstr_tok: ["Interpolate","data","defined","on","a","rectilinear","grid","with","even","or","uneven","spacing",".","Produces","similar","results","to","scipy","RegularGridInterpolator","or","interp2d","in","'linear","'","mode",".","Taken","from","https",":","\/\/github.com\/sbarratt\/torch_interpolations"]
code: def __init__(self, points, values):
      self.points = points
      self.values = values
  
      assert isinstance(self.points, tuple) or isinstance(
          self.points, list
      )
      assert isinstance(self.values, torch.Tensor)
  
      self.ms = list(self.values.shape)
      self.n = len(self.points)
  
      assert len(self.ms) == self.n
  
      for i, p in enumerate(self.points):
          assert isinstance(p, torch.Tensor)
          assert p.shape[0] == self.values.shape[i]
  
imports: import torch
  from itertools import product
label_desc: Use image node_id 1 to create a new RegularGridInterpolator object  with example: obj = RegularGridInterpolator(points, values)