|
ADCT Python
Python client API implementation for publishing ADCT data
|
Classes | |
| class | Field |
| Field details indicate how to handle a data returned from builder lookups. More... | |
| class | KeyType |
| The builder type (section or map value) or unknown. More... | |
| class | ScalarType |
| field types for scientific data encode/decode with json. More... | |
Functions | |
| bool | is_string_type (ScalarType st) |
| return True if st is of the single string subclassifications | |
| str | scalar_to_json (ScalarType st, array_type=False) |
| scalar_from_json (str name, strict=False) | |
| convert json type string used in add functions to ScalarType | |
| scalar_from_numpy (numpy.dtype dt) | |
| convert numpy dtype to adc scalar type | |
| ScalarType | get_common_scalar (list|tuple|collections.abc.Set slt, int depth, list[int] maxdepth) |
| get the common scalar type from a possibly nested tuple/set/list | |
| numpy.ndarray | forsplitcomplex (numpy.ndarray a) |
| numpy.ndarray | csplitcomplex (numpy.ndarray a) |
| get_list_format_numpy (numpy.ndarray a) | |
| build a nested list out of numpy array, accounting for int must fit in int64 or be string encoded and accounting for complex numbers. | |
| get_list_format (list|tuple|collections.abc.Set|numpy.ndarray slt, ScalarType st=None) | |
| build a nested list out of homogeneous python or numpy nest | |
| typecode_to_scalar (array.array v) | |
| type_to_scalar (type t, value=None) | |
| convert python type to ScalarType numpy array types are supported if value is given. | |
| bool | fits_int64 (int v) |
| bool | fits_uint64 (int v) |
Variables | |
| int | ADC_SUPPORT_GPU_FLOATS = 0 |
| Set to 1 if 8/16 bit float types for gpus are supported. | |
| int | ADC_SUPPORT_EXTENDED_FLOATS = 1 |
| Set to 1 if 80 bit floats for cpus are supported. | |
| int | ADC_SUPPORT_QUAD_FLOATS = 0 |
| Set to 1 if 128 bit floats for cpus are supported. | |
| numpy.ndarray adctk.adc_types.csplitcomplex | ( | numpy.ndarray | a | ) |
Convert a numpy array of complex to a flat array of real pairs
| bool adctk.adc_types.fits_int64 | ( | int | v | ) |
| bool adctk.adc_types.fits_uint64 | ( | int | v | ) |
| numpy.ndarray adctk.adc_types.forsplitcomplex | ( | numpy.ndarray | a | ) |
Convert a numpy array of fortran complex to a flat array of real pairs
| ScalarType adctk.adc_types.get_common_scalar | ( | list|tuple|collections.abc.Set | slt, |
| int | depth, | ||
| list[int] | maxdepth | ||
| ) |
get the common scalar type from a possibly nested tuple/set/list
| slt | data nest with single scalar type at the leaf locations. |
| depth | current recursion depth, 0 at the application level. |
| maxdepth | is a one-element array output argument. |
| adctk.adc_types.get_list_format | ( | list|tuple|collections.abc.Set|numpy.ndarray | slt, |
| ScalarType | st = None |
||
| ) |
build a nested list out of homogeneous python or numpy nest
| adctk.adc_types.get_list_format_numpy | ( | numpy.ndarray | a | ) |
build a nested list out of numpy array, accounting for int must fit in int64 or be string encoded and accounting for complex numbers.
| bool adctk.adc_types.is_string_type | ( | ScalarType | st | ) |
return True if st is of the single string subclassifications
| adctk.adc_types.scalar_from_json | ( | str | name, |
strict = False |
|||
| ) |
convert json type string used in add functions to ScalarType
| name | convert json scalar type label to enum. |
| strict | if True, raises an exception when name is invalid array_* type prefix is stripped, if present in name. |
| adctk.adc_types.scalar_from_numpy | ( | numpy.dtype | dt | ) |
convert numpy dtype to adc scalar type
| str adctk.adc_types.scalar_to_json | ( | ScalarType | st, |
array_type = False |
|||
| ) |
Convert ScalarType to json type string used in add functions
| adctk.adc_types.type_to_scalar | ( | type | t, |
value = None |
|||
| ) |
convert python type to ScalarType numpy array types are supported if value is given.
int type is supported only if a value is given. Semantic variations on string content are all mapped to cp_cstr.
| adctk.adc_types.typecode_to_scalar | ( | array.array | v | ) |
| int adctk.adc_types.ADC_SUPPORT_EXTENDED_FLOATS = 1 |
Set to 1 if 80 bit floats for cpus are supported.
ADC_SUPPORT_EXTENDED_FLOATS should be defined by build-time configuration
| int adctk.adc_types.ADC_SUPPORT_GPU_FLOATS = 0 |
Set to 1 if 8/16 bit float types for gpus are supported.
ADC_SUPPORT_GPU_FLOATS should be defined by build-time configuration
| int adctk.adc_types.ADC_SUPPORT_QUAD_FLOATS = 0 |
Set to 1 if 128 bit floats for cpus are supported.
ADC_SUPPORT_QUAD_FLOATS should be defined by build-time configuration