Idx File !new!

# Determine numpy dtype np_dtype = 0x08: np.uint8, 0x09: np.int8, 0x0B: np.int16, 0x0C: np.int32, 0x0D: np.float32, 0x0E: np.float64 [data_type_code]

def write_idx(filename, data_array): """Write a numpy array to IDX format.""" # Determine data type code dtype_map = np.uint8: 0x08, np.int8: 0x09, np.int16: 0x0B, np.int32: 0x0C, np.float32: 0x0D, np.float64: 0x0E idx file

A standard IDX file contains:

| Code (decimal) | Code (hex) | Data Type | C equivalent (typical) | .NET equivalent | |----------------|------------|-----------|------------------------|------------------| | 0x08 | 8 | Unsigned byte (uint8) | unsigned char | Byte | | 0x09 | 9 | Signed byte (int8) | signed char | SByte | | 0x0B | 11 | Short (int16) | short | Int16 | | 0x0C | 12 | Int32 (int) | int | Int32 | | 0x0D | 13 | Float (single) | float | Single | | 0x0E | 14 | Double | double | Double | # Determine numpy dtype np_dtype = 0x08: np

The most common use of the .idx extension for general users is in DVD playback. 0x0E: np.float64 [data_type_code] def write_idx(filename