ArrayOfBlock
- class pyarts3.arts.ArrayOfBlock(*args, **kwargs)
A list of blocks
Overview
Method
Append arg to the end of the list.
Method
Append variable from file.
Method
Remove all items from list.
Method
Extend self by appending elements from arg.
Method
Extend variable from file.
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, /) -> NoneOperator
Return self==value.
Operator
Default object formatter.
Operator
Return self>=value.
Operator
__getitem__(self, arg: slice, /) -> pyarts3.arts.ArrayOfBlockOperator
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) -> intOperator
Return self<value.
Operator
Return self!=value.
Operator
__repr__(self) -> strOperator
__setitem__(self, arg0: slice, arg1: pyarts3.arts.ArrayOfBlock, /) -> NoneOperator
Return str(self).
Constructors
- __init__(self) None
- __init__(self, arg: ArrayOfBlock) None
- __init__(self, arg: Iterable[Block], /) None
- __init__(self) None
- __init__(self, arg: 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
- appendxml(self, file: str) str
Append variable from file.
The content of the file is added to the existing variable.
- 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:
- extend(self, arg: ArrayOfBlock, /) None
Extend self by appending elements from arg.
- extendxml(self, file: str) str
Extend variable from file.
The content of the file is added to the existing variable.
- 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:
- 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
FileTypefor 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) ArrayOfBlock
Create variable from file.
- Parameters:
file (str) – A file that can be read
- Raises:
RuntimeError – For any failure to read.
- fromxmls(files: ArrayOfString) ArrayOfBlock
Create variable from file.
Like
fromxml()but for split/multiple files.- Parameters:
- Raises:
RuntimeError – For any failure to read.
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, /) Block
- __getitem__(self, arg: slice, /) ArrayOfBlock
- __gt__(value, /)
Return self>value.
- __hash__()
Return hash(self).
- __init__(self) None
- __init__(self, arg: ArrayOfBlock) None
- __init__(self, arg: Iterable[Block], /) None
- __init__(self) None
- __init__(self, arg: 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
- __le__(value, /)
Return self<=value.
- __lt__(value, /)
Return self<value.
- __ne__(value, /)
Return self!=value.
- __setitem__(self, arg0: int, arg1: Block, /) None
- __setitem__(self, arg0: slice, arg1: ArrayOfBlock, /) None
- __str__()
Return str(self).