class_docstr: Constructs a PennyLane tensor for use with Autograd QNodes.
  
  The ``tensor`` class is a subclass of ``numpy.ndarray``,
  providing the same multidimensional, homogeneous data-structure
  of fixed-size items, with an additional flag to indicate to PennyLane
  whether the contained data is differentiable or not.
  
  .. warning::
  
      PennyLane ``tensor`` objects are only used as part of the Autograd QNode
      interface. If using another machine learning library such as PyTorch or
      TensorFlow, use their built-in ``tf.Variable`` and ``torch.tensor`` classes
      instead.
  
  .. warning::
  
      Tensors should be constructed using standard array construction functions
      provided as part of PennyLane's NumPy implementation, including
      ``np.array``, ``np.zeros`` or ``np.empty``.
  
      The parameters given here refer to a low-level class
      for instantiating tensors.
  
  
  Args:
      input_array (array_like): Any data structure in any form that can be converted to
          an array. This includes lists, lists of tuples, tuples, tuples of tuples,
          tuples of lists and ndarrays.
      requires_grad (bool): whether the tensor supports differentiation
  
  **Example**
  
  The trainability of a tensor can be set on construction via the
  ``requires_grad`` keyword argument,
  
  >>> from pennylane import numpy as np
  >>> x = np.array([0, 1, 2], requires_grad=True)
  >>> x
  tensor([0, 1, 2], requires_grad=True)
  
  or in-place by modifying the ``requires_grad`` attribute:
  
  >>> x.requires_grad = False
  tensor([0, 1, 2], requires_grad=False)
  
  Since tensors are subclasses of ``np.ndarray``, they can be provided as arguments
  to any PennyLane-wrapped NumPy function:
  
  >>> np.sin(x)
  tensor([0.        , 0.84147098, 0.90929743], requires_grad=True)
  
  When composing functions of multiple tensors, if at least one input tensor is differentiable,
  then the output will also be differentiable:
  
  >>> x = np.array([0, 1, 2], requires_grad=False)
  >>> y = np.zeros([3], requires_grad=True)
  >>> np.vstack([x, y])
  tensor([[0., 1., 2.],
      [0., 0., 0.]], requires_grad=True)
class_docstr_tok: ["Constructs","a","PennyLane","tensor","for","use","with","Autograd","QNodes",".","The","``","tensor","``","class","is","a","subclass","of","``","numpy.ndarray","``",",","providing","the","same","multidimensional",",","homogeneous","data-structure","of","fixed-size","items",",","with","an","additional","flag","to","indicate","to","PennyLane","whether","the","contained","data","is","differentiable","or","not",".","..","warning",":",":","PennyLane","``","tensor","``","objects","are","only","used","as","part","of","the","Autograd","QNode","interface",".","If","using","another","machine","learning","library","such","as","PyTorch","or","TensorFlow",",","use","their","built-in","``","tf.Variable","``","and","``","torch.tensor","``","classes","instead",".","..","warning",":",":","Tensors","should","be","constructed","using","standard","array","construction","functions","provided","as","part","of","PennyLane","'s","NumPy","implementation",",","including","``","np.array","``",",","``","np.zeros","``","or","``","np.empty","``",".","The","parameters","given","here","refer","to","a","low-level","class","for","instantiating","tensors",".","Args",":","input_array","(","array_like",")",":","Any","data","structure","in","any","form","that","can","be","converted","to","an","array",".","This","includes","lists",",","lists","of","tuples",",","tuples",",","tuples","of","tuples",",","tuples","of","lists","and","ndarrays",".","requires_grad","(","bool",")",":","whether","the","tensor","supports","differentiation","*","*","Example","*","*","The","trainability","of","a","tensor","can","be","set","on","construction","via","the","``","requires_grad","``","keyword","argument",",",">",">",">","from","pennylane","import","numpy","as","np",">",">",">","x","=","np.array","(","[","0",",","1",",","2","]",",","requires_grad=True",")",">",">",">","x","tensor","(","[","0",",","1",",","2","]",",","requires_grad=True",")","or","in-place","by","modifying","the","``","requires_grad","``","attribute",":",">",">",">","x.requires_grad","=","False","tensor","(","[","0",",","1",",","2","]",",","requires_grad=False",")","Since","tensors","are","subclasses","of","``","np.ndarray","``",",","they","can","be","provided","as","arguments","to","any","PennyLane-wrapped","NumPy","function",":",">",">",">","np.sin","(","x",")","tensor","(","[","0.",",","0.84147098",",","0.90929743","]",",","requires_grad=True",")","When","composing","functions","of","multiple","tensors",",","if","at","least","one","input","tensor","is","differentiable",",","then","the","output","will","also","be","differentiable",":",">",">",">","x","=","np.array","(","[","0",",","1",",","2","]",",","requires_grad=False",")",">",">",">","y","=","np.zeros","(","[","3","]",",","requires_grad=True",")",">",">",">","np.vstack","(","[","x",",","y","]",")","tensor","(","[","[","0.",",","1.",",","2",".","]",",","[","0.",",","0.",",","0",".","]","]",",","requires_grad=True",")"]
docstr: Converts the tensor to a standard, non-differentiable NumPy ndarray or Python scalar if
  the tensor is 0-dimensional.
  
  This method is an alias for :meth:`~.unwrap`. See :meth:`~.unwrap` for more details.
docstr_tok: ["Converts","the","tensor","to","a","standard",",","non-differentiable","NumPy","ndarray","or","Python","scalar","if","the","tensor","is","0-dimensional",".","This","method","is","an","alias","for",":","meth",":","`","~.unwrap","`",".","See",":","meth",":","`","~.unwrap","`","for","more","details","."]
code: def numpy(self):
      """Converts the tensor to a standard, non-differentiable NumPy ndarray or Python scalar if
      the tensor is 0-dimensional.
  
      This method is an alias for :meth:`~.unwrap`. See :meth:`~.unwrap` for more details.
      """
      return self.unwrap()
  
imports: import numpy
  from autograd import numpy
  from autograd.core import VSpace
  from autograd.extend import defvjp, primitive
  from autograd.numpy.numpy_boxes import ArrayBox
  from autograd.numpy.numpy_vspaces import ArrayVSpace, ComplexArrayVSpace
  from autograd.tracer import Box
  from pennylane.operation import Operator
label_desc: Use image node_id 11 for calling the tensor obj's underlying member method code with example usage: obj.numpy() and returns: self