Ticket #828: pprint.patch

File pprint.patch, 0.6 kB (added by NeilMuller, 5 months ago)

Reorder dictionary creation terms so pprint key order is preserved

  • format.py

    old new  
    141141    """ 
    142142    d = {} 
    143143    d['shape'] = array.shape 
     144    d['descr'] = dtype_to_descr(array.dtype) 
    144145    if array.flags.c_contiguous: 
    145146        d['fortran_order'] = False 
    146147    elif array.flags.f_contiguous: 
     
    151152        # because a 1-D array is both C_CONTIGUOUS and F_CONTIGUOUS. 
    152153        d['fortran_order'] = False 
    153154 
    154     d['descr'] = dtype_to_descr(array.dtype) 
    155155    return d 
    156156 
    157157def write_array_header_1_0(fp, d):