sidpy.hdf.dtype_utilsΒΆ

Utilities for transforming and validating data types

Given that many of the data transformations involve copying the data, they should ideally happen in a lazy manner to avoid memory issues.

Created on Tue Nov 3 21:14:25 2015

@author: Suhas Somnath, Chris Smith

Functions

check_dtype

Checks the datatype of the input HDF5 dataset and provides the appropriate function calls to convert it to a float

flatten_complex_to_real

Stacks the real values followed by the imaginary values in the last dimension of the given N dimensional matrix.

flatten_compound_to_real

Flattens the individual components in a structured array or compound valued hdf5 dataset along the last axis to form a real valued array.

flatten_to_real

Flattens complex / compound / real valued arrays to real valued arrays

get_compound_sub_dtypes

Returns a dictionary of the dtypes of each of the fields in the given structured array dtype

is_complex_dtype

Checks if the provided dtype is a complex dtype

stack_real_to_complex

Puts the real and imaginary sections of the provided matrix (in the last axis) together to make complex matrix

stack_real_to_compound

Converts a real-valued dataset to a compound dataset (along the last axis) of the provided compound d-type

stack_real_to_target_dtype

Transforms real data into the target dtype

validate_dtype

Checks the provided object to ensure that it is a valid dtype that can be written to an HDF5 file.