Complex
- class ase2sprkkr.bindings.xband.tests.grammar_types.arrays.Complex(type, default_value=None, length=None, max_length=None, min_length=None, as_list=False, format=None, **kwargs)[source]
Class hierarchy
Constructor
- __init__(type, default_value=None, length=None, max_length=None, min_length=None, as_list=False, format=None, **kwargs)[source]
- Parameters:
type – The grammar type of the values in the list (it can be given by a python type)
default_value – The default value for the list
length – If it is set, the list have to have just this length (it sets
min_
andmax_length
to thelength
)min_length – The minimal allowed length of the list.
max_length – The maximal allowed length of the list.
as_list – Type of the value array. True means List, False means np.ndarray, or custom type (e.g. tuple) can be provided. However, the value can be set using tuple or list anyway.
- array_access = False
The value of this type can be accessed as array
- numpy_type
alias of
complex
- _string(val)[source]
Convert the value to the ouput.
The
string()
apply format and do some additional transformation (add prefix, postfix etc.), so the actual way how to convert the value for the output should be here.
- I = <Complex>
- allowed_types = (<class 'numpy.complex128'>, <class 'complex'>)
- datatype
alias of
complex
- datatype_name = 'complex'