MCPcopy Create free account
hub / github.com/Kitware/ParaView / GetArray

Method GetArray

Wrapping/Python/paraview/servermanager.py:1981–1991  ·  view source on GitHub ↗

Given an index or a string, returns an array information. Raises IndexError if the index is out of bounds.

(self, idx)

Source from the content-addressed store, hash-verified

1979 return self.GetFieldData().GetNumberOfArrays()
1980
1981 def GetArray(self, idx):
1982 """Given an index or a string, returns an array information.
1983 Raises IndexError if the index is out of bounds."""
1984 self.Proxy.UpdatePipeline()
1985 if not self.GetFieldData().GetArrayInformation(idx):
1986 return None
1987 if isinstance(idx, str):
1988 return ArrayInformation(self.Proxy, self, idx)
1989 elif idx >= len(self) or idx < 0:
1990 raise IndexError
1991 return ArrayInformation(self.Proxy, self, self.GetFieldData().GetArrayInformation(idx).GetName())
1992
1993 def __len__(self):
1994 """Returns the number of arrays."""

Callers 15

__getitem__Method · 0.95
keysMethod · 0.95
valuesMethod · 0.95
itemsMethod · 0.95
has_keyMethod · 0.95
__contains__Method · 0.95
__getattr__Method · 0.95
writeLightArrayMethod · 0.45
writeMeshArrayMethod · 0.45
writeArrayMethod · 0.45
writeDataMethod · 0.45
writeDataMethod · 0.45

Calls 5

GetFieldDataMethod · 0.95
ArrayInformationClass · 0.85
UpdatePipelineMethod · 0.45
GetArrayInformationMethod · 0.45
GetNameMethod · 0.45

Tested by

no test coverage detected