class_docstr: Dataset with variable spacing in the three coordinate directions.
  
  Can be initialized in several ways:
  
  * Create empty grid
  * Initialize from a ``vtk.vtkRectilinearGrid`` object
  * Initialize directly from the point arrays
  
  Parameters
  ----------
  uinput : str, pathlib.Path, vtk.vtkRectilinearGrid, numpy.ndarray, optional
      Filename, dataset, or array to initialize the rectilinear grid from. If a
      filename is passed, pyvista will attempt to load it as a
      :class:`RectilinearGrid`. If passed a ``vtk.vtkRectilinearGrid``, it
      will be wrapped. If a :class:`numpy.ndarray` is passed, this will be
      loaded as the x range.
  
  y : numpy.ndarray, optional
      Coordinates of the points in y direction. If this is passed, ``uinput``
      must be a :class:`numpy.ndarray`.
  
  z : numpy.ndarray, optional
      Coordinates of the points in z direction. If this is passed, ``uinput``
      and ``y`` must be a :class:`numpy.ndarray`.
  
  check_duplicates : bool, optional
      Check for duplications in any arrays that are passed. Defaults to
      ``False``. If ``True``, an error is raised if there are any duplicate
      values in any of the array-valued input arguments.
  
  deep : bool, optional
      Whether to deep copy a ``vtk.vtkRectilinearGrid`` object.
      Default is ``False``.  Keyword only.
  
  Examples
  --------
  >>> import pyvista as pv
  >>> import vtk
  >>> import numpy as np
  
  Create an empty grid.
  
  >>> grid = pv.RectilinearGrid()
  
  Initialize from a vtk.vtkRectilinearGrid object
  
  >>> vtkgrid = vtk.vtkRectilinearGrid()
  >>> grid = pv.RectilinearGrid(vtkgrid)
  
  Create from NumPy arrays.
  
  >>> xrng = np.arange(-10, 10, 2)
  >>> yrng = np.arange(-10, 10, 5)
  >>> zrng = np.arange(-10, 10, 1)
  >>> grid = pv.RectilinearGrid(xrng, yrng, zrng)
  >>> grid.plot(show_edges=True)
class_docstr_tok: ["Dataset","with","variable","spacing","in","the","three","coordinate","directions",".","Can","be","initialized","in","several","ways",":","*","Create","empty","grid","*","Initialize","from","a","``","vtk.vtkRectilinearGrid","``","object","*","Initialize","directly","from","the","point","arrays","Parameters","--","--","--","--","--","uinput",":","str",",","pathlib.Path",",","vtk.vtkRectilinearGrid",",","numpy.ndarray",",","optional","Filename",",","dataset",",","or","array","to","initialize","the","rectilinear","grid","from",".","If","a","filename","is","passed",",","pyvista","will","attempt","to","load","it","as","a",":","class",":","`","RectilinearGrid","`",".","If","passed","a","``","vtk.vtkRectilinearGrid","``",",","it","will","be","wrapped",".","If","a",":","class",":","`","numpy.ndarray","`","is","passed",",","this","will","be","loaded","as","the","x","range",".","y",":","numpy.ndarray",",","optional","Coordinates","of","the","points","in","y","direction",".","If","this","is","passed",",","``","uinput","``","must","be","a",":","class",":","`","numpy.ndarray","`",".","z",":","numpy.ndarray",",","optional","Coordinates","of","the","points","in","z","direction",".","If","this","is","passed",",","``","uinput","``","and","``","y","``","must","be","a",":","class",":","`","numpy.ndarray","`",".","check_duplicates",":","bool",",","optional","Check","for","duplications","in","any","arrays","that","are","passed",".","Defaults","to","``","False","``",".","If","``","True","``",",","an","error","is","raised","if","there","are","any","duplicate","values","in","any","of","the","array-valued","input","arguments",".","deep",":","bool",",","optional","Whether","to","deep","copy","a","``","vtk.vtkRectilinearGrid","``","object",".","Default","is","``","False","``",".","Keyword","only",".","Examples","--","--","--","--",">",">",">","import","pyvista","as","pv",">",">",">","import","vtk",">",">",">","import","numpy","as","np","Create","an","empty","grid",".",">",">",">","grid","=","pv.RectilinearGrid","(",")","Initialize","from","a","vtk.vtkRectilinearGrid","object",">",">",">","vtkgrid","=","vtk.vtkRectilinearGrid","(",")",">",">",">","grid","=","pv.RectilinearGrid","(","vtkgrid",")","Create","from","NumPy","arrays",".",">",">",">","xrng","=","np.arange","(","-10",",","10",",","2",")",">",">",">","yrng","=","np.arange","(","-10",",","10",",","5",")",">",">",">","zrng","=","np.arange","(","-10",",","10",",","1",")",">",">",">","grid","=","pv.RectilinearGrid","(","xrng",",","yrng",",","zrng",")",">",">",">","grid.plot","(","show_edges=True",")"]
docstr: Update the dimensions if coordinates have changed.
code: def _update_dimensions(self):
      """Update the dimensions if coordinates have changed."""
      return self.SetDimensions(len(self.x), len(self.y), len(self.z))
  
imports: from functools import wraps
  import pathlib
  from typing import Sequence, Tuple, Union
  import warnings
  import numpy
  import pyvista
  from .None import _vtk_core
  from .dataset import DataSet
  from .errors import PyVistaDeprecationWarning
  from .filters import ImageDataFilters, RectilinearGridFilters, _get_output
  from .utilities.arrays import convert_array, raise_has_duplicates
  from .utilities.misc import abstract_class, assert_empty_kwargs
label_desc: Use image node_id 4 for calling the RectilinearGrid obj's underlying member method code with example usage: obj._update_dimensions() and returns: self