ArrayOfBlock
- class pyarts3.arts.ArrayOfBlock(*args, **kwargs)
A list of blocks
Overview
Method
Append arg to the end of the list.
Method
Remove all items from list.
Method
Extend self by appending elements from arg.
Method
Insert object arg1 before index arg0.
Method
Remove and return item at index (default last).
Method
Read variable from file.
Method
Saves variable to file.
Static Method
Create variable from file.
Static Method
Create variable from file.
Operator
__delitem__(self, arg: slice, /) -> None
Operator
Return self==value.
Operator
Default object formatter.
Operator
Return self>=value.
Operator
__getitem__(self, arg: slice, /) -> pyarts3.arts.ArrayOfBlock
Operator
__getstate__(self) -> tuple[pyarts3.arts.ArrayOfBlock]
Operator
Return self>value.
Operator
Return hash(self).
Operator
Overloaded function.
Operator
__iter__(self) -> collections.abc.Iterator[pyarts3.arts.Block]
Operator
Return self<=value.
Operator
__len__(self) -> int
Operator
Return self<value.
Operator
Return self!=value.
Operator
__repr__(self) -> str
Operator
__setitem__(self, arg0: slice, arg1: pyarts3.arts.ArrayOfBlock, /) -> None
Operator
__setstate__(self, arg: tuple[pyarts3.arts.ArrayOfBlock]) -> None
Operator
Return str(self).
Constructors
- __init__(self) None
- __init__(self, arg: pyarts3.arts.ArrayOfBlock) None
- __init__(self, arg: collections.abc.Iterable[pyarts3.arts.Block], /) None
- __init__(self) None
- __init__(self, arg: pyarts3.arts.ArrayOfBlock) None
Overloaded function.
__init__(self) -> None
Default constructor
__init__(self, arg: pyarts3.arts.ArrayOfBlock) -> None
Copy constructor
__init__(self, arg: collections.abc.Iterable[pyarts3.arts.Block], /) -> None
Construct from an iterable object
__init__(self) -> None
__init__(self, arg: pyarts3.arts.ArrayOfBlock) -> None
Methods
- append(self, arg: pyarts3.arts.Block, /) None
Append arg to the end of the list.
- extend(self, arg: pyarts3.arts.ArrayOfBlock, /) None
Extend self by appending elements from arg.
- insert(self, arg0: int, arg1: pyarts3.arts.Block, /) None
Insert object arg1 before index arg0.
- pop(self, index: int = -1) pyarts3.arts.Block
Remove and return item at index (default last).
- readxml(self, file: str) str
Read variable from file.
- Parameters:
file (str) – A file that can be read.
- Raises:
RuntimeError – For any failure to read.
- Returns:
file – The file path found (may differ from input due to environment variables).
- Return type:
- savexml(self, file: str, type: str = 'ascii', clobber: bool = True) str
Saves variable to file.
- Parameters:
file (str) – The path to which the file is written. Note that several of the options might modify the name or write more files.
type (str, optional) – Type of file to save. See
FileType
for options. Defaults is “ascii”.clobber (bool, optional) – Overwrite existing files or add new file with modified name? Defaults is True.
- Raises:
RuntimeError – For any failure to write.
- Returns:
file – The file saved. May differ from input.
- Return type:
Static Methods
- fromxml(file: str) pyarts3.arts.ArrayOfBlock
Create variable from file.
- Parameters:
file (str) – A file that can be read
- Raises:
RuntimeError – For any failure to read.
- Returns:
artstype – The variable created from the file.
- Return type:
T
- fromxmls(files: pyarts3.arts.ArrayOfString) pyarts3.arts.ArrayOfBlock
Create variable from file.
Like
fromxml()
but for split/multiple files.- Parameters:
- Raises:
RuntimeError – For any failure to read.
- Returns:
artstype – The variable created from the file.
- Return type:
T
Operators
- __eq__(value, /)
Return self==value.
- __format__(format_spec, /)
Default object formatter.
Return str(self) if format_spec is empty. Raise TypeError otherwise.
- __ge__(value, /)
Return self>=value.
- __getitem__(self, arg: int, /) pyarts3.arts.Block
- __getitem__(self, arg: slice, /) pyarts3.arts.ArrayOfBlock
- __getstate__(self) tuple[pyarts3.arts.ArrayOfBlock]
- __gt__(value, /)
Return self>value.
- __hash__()
Return hash(self).
- __init__(self) None
- __init__(self, arg: pyarts3.arts.ArrayOfBlock) None
- __init__(self, arg: collections.abc.Iterable[pyarts3.arts.Block], /) None
- __init__(self) None
- __init__(self, arg: pyarts3.arts.ArrayOfBlock) None
Overloaded function.
__init__(self) -> None
Default constructor
__init__(self, arg: pyarts3.arts.ArrayOfBlock) -> None
Copy constructor
__init__(self, arg: collections.abc.Iterable[pyarts3.arts.Block], /) -> None
Construct from an iterable object
__init__(self) -> None
__init__(self, arg: pyarts3.arts.ArrayOfBlock) -> None
- __iter__(self) collections.abc.Iterator[pyarts3.arts.Block]
- __le__(value, /)
Return self<=value.
- __lt__(value, /)
Return self<value.
- __ne__(value, /)
Return self!=value.
- __setitem__(self, arg0: int, arg1: pyarts3.arts.Block, /) None
- __setitem__(self, arg0: slice, arg1: pyarts3.arts.ArrayOfBlock, /) None
- __setstate__(self, arg: tuple[pyarts3.arts.ArrayOfBlock]) None
- __str__()
Return str(self).