[ILNumerics HDF5 Module]
Namespace: ILNumerics.IO.HDF5
Assembly: ILNumerics.IO.HDF5 (in ILNumerics.IO.HDF5.dll) Version: 5.5.0.0 (5.5.7503.3146)
Parameters
- range
- Type: ILNumericsBaseArray
[optional] subarray range specification - padding (Optional)
- Type: SystemNullableStringPadding
For fixed length string storage only: specifies how to handle the padding bytes/characters. Default: NULLTERM (cut-off remaining characters).
Return Value
Type: RetArrayStringArray or subarray of strings of the size determined by range.
This function is used to retrieve an array from the dataset or parts of the dataset. The range parameter is used to define the range to request. If range is ommited, the whole dataset is retrieved and its data returned as ILNumerics array.
As range parameter all options for addressing subarrays from Arrays are allowed. This includes any combination of ranged dimension specifiers, stepped ranges (increasing or decreasing), combined dimension specifiers and sequential indices. If range contains a single numeric array of arbitrary shape, its elements are interpreted as sequential indices into the dataset. Read all details about subarray addressing options in the ILNumerics Subarray Tutorial.
A note on performance: ILNumerics uses hyperslab selections from HDF5 in order to retrieve subarrays from datasets. This allows one to read parts of the dataset without accessing the whole dataset. For large datasets using hyperslab selections can drastically reduce the memory requirements and therefore improve the performance of the retrieval.
In order to use the hyperslab feature of HDF5, no actions are neccessary from the ILNumerics side. ILNumerics automatically translates the subarray specification given by range into corresponding hyperslab selections. However, since the way hyperslabs work is not 100% compatible with ILNumerics' subarray features, the conversion and highly efficient subarry access is only possible for certain subarray range specifications. See the ILNumerics HDF5 online manual for a comprehensive list of all conditions.
The padding parameter is used to specify how to retrieve strings which are stored as fixed length strings. By default (NULLTERM) superfluous characters up to the end of the (fixed) length are removed. In this case the strings returned will not expose any whitespace at the end / after the first 0-character. This has a similar effect as using Trim on the string elements. Other values (SPACEPAD and ZEROPAD) retain those characters in the string.
Provide null for padding in order to return the strings in their natural padding mode as had been used at the time of creating the dataset.
For variable length strings the setting of padding does not have any effect. Those strings are always returned without padding characters.
[ILNumerics HDF5 Module]