class_docstr: A ndarray which references the owning dataset and the underlying vtkArray.
  
  This array can be acted upon just like a :class:`numpy.ndarray`.
  
  Parameters
  ----------
  array : Array or vtk.vtkAbstractArray
      Array like.
  
  dataset : pyvista.DataSet
      Input dataset.
  
  association : pyvista.core.utilities.arrays.FieldAssociation
      Field association.
  
  Examples
  --------
  Return the points of a Sphere as a :class:`pyvista.pyvista_ndarray`.
  
  >>> import pyvista as pv
  >>> mesh = pv.Sphere()
  >>> mesh.points  # doctest:+SKIP
  pyvista_ndarray([[-5.5511151e-17,  0.0000000e+00, -5.0000000e-01],
                   [ 5.5511151e-17,  0.0000000e+00,  5.0000000e-01],
                   [-5.4059509e-02,  0.0000000e+00, -4.9706897e-01],
                   ...,
                   [-1.5616201e-01, -3.3193260e-02,  4.7382659e-01],
                   [-1.0513641e-01, -2.2347433e-02,  4.8831028e-01],
                   [-5.2878179e-02, -1.1239604e-02,  4.9706897e-01]],
                  dtype=float32)
class_docstr_tok: ["A","ndarray","which","references","the","owning","dataset","and","the","underlying","vtkArray",".","This","array","can","be","acted","upon","just","like","a",":","class",":","`","numpy.ndarray","`",".","Parameters","--","--","--","--","--","array",":","Array","or","vtk.vtkAbstractArray","Array","like",".","dataset",":","pyvista.DataSet","Input","dataset",".","association",":","pyvista.core.utilities.arrays.FieldAssociation","Field","association",".","Examples","--","--","--","--","Return","the","points","of","a","Sphere","as","a",":","class",":","`","pyvista.pyvista_ndarray","`",".",">",">",">","import","pyvista","as","pv",">",">",">","mesh","=","pv.Sphere","(",")",">",">",">","mesh.points","#","doctest",":","+SKIP","pyvista_ndarray","(","[","[","-5.5511151e-17",",","0.0000000e+00",",","-5.0000000e-01","]",",","[","5.5511151e-17",",","0.0000000e+00",",","5.0000000e-01","]",",","[","-5.4059509e-02",",","0.0000000e+00",",","-4.9706897e-01","]",",","...",",","[","-1.5616201e-01",",","-3.3193260e-02",",","4.7382659e-01","]",",","[","-1.0513641e-01",",","-2.2347433e-02",",","4.8831028e-01","]",",","[","-5.2878179e-02",",","-1.1239604e-02",",","4.9706897e-01","]","]",",","dtype=float32",")"]
docstr: Allocate the array.
docstr_tok: ["Allocate","the","array","."]
code: def __new__(
      cls,
      array: Union[Array, _vtk.vtkAbstractArray],
      dataset=None,
      association=FieldAssociation.NONE,
  ):
      """Allocate the array."""
      if isinstance(array, Iterable):
          obj = np.asarray(array).view(cls)
      elif isinstance(array, _vtk.vtkAbstractArray):
          obj = convert_array(array).view(cls)
          obj.VTKObject = array
      else:
          raise TypeError(
              f"pyvista_ndarray got an invalid type {type(array)}. "
              "Expected an Iterable or vtk.vtkAbstractArray"
          )
  
      obj.association = association
      obj.dataset = _vtk.vtkWeakReference()
      if isinstance(dataset, _vtk.VTKObjectWrapper):
          obj.dataset.Set(dataset.VTKObject)
      else:
          obj.dataset.Set(dataset)
      return obj
  
file_path: pyvista/pyvista/core/pyvista_ndarray.py
imports: from collections.abc import Iterable
  from typing import Union
  import numpy
  from .None import _vtk_core
  from ._typing_core import Array
  from .utilities.arrays import FieldAssociation, convert_array
label_desc: Use image node_id 1 for calling the pyvista_ndarray obj's underlying member method code with example usage: obj.__new__(cls, array, dataset, association) and returns: obj