MCPcopy Create free account
hub / github.com/Kitware/VTK / create_reader

Method create_reader

Wrapping/Python/vtkmodules/util/xarray_support.py:25–38  ·  view source on GitHub ↗

Returns a vtkXArrayCFReader that reads data from the XArray (using zero-copy when possible). At the moment, data is copied for coordinates (because they are converted to double in the reader) and for certain data that is subset either in XArray or in VTK. Laz

(self)

Source from the content-addressed store, hash-verified

23 self._dsxr = dsxr
24
25 def create_reader(self):
26 '''
27 Returns a vtkXArrayCFReader that reads data from the XArray
28 (using zero-copy when possible). At the moment, data is copied
29 for coordinates (because they are converted to double in the reader)
30 and for certain data that is subset either in XArray or in VTK.
31 Lazy loading in XArray is respected, that is data is accessed only when
32 it is needed.
33 Time is passed to VTK either as an int64 for datetime64 or timedelta64,
34 or as a double (using cftime.toordinal) for cftime.
35 '''
36 reader = vtkXArrayCFReader()
37 reader.SetXArray(self._dsxr)
38 return reader
39
40
41class vtkXArrayCFReader(VTKPythonAlgorithmBase):

Callers 1

get_readerFunction · 0.80

Calls 2

vtkXArrayCFReaderClass · 0.85
SetXArrayMethod · 0.80

Tested by

no test coverage detected