Changes in / [df72475:c22b621] in sasview


Ignore:
Location:
src/sas/sascalc/dataloader/readers
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sascalc/dataloader/readers/cansas_reader.py

    r62160509 r2b538cd  
    589589            try: 
    590590                unit = attr['unit'] 
     591                # Split the units to retain backwards compatibility with 
     592                # projects, analyses, and saved data from v4.1.0 
    591593                unit_list = unit.split("|") 
    592594                if len(unit_list) > 1: 
    593                     self.current_dataset.xaxis(unit_list[0].strip(), 
    594                                                unit_list[1].strip()) 
    595595                    local_unit = unit_list[1] 
    596596                else: 
     
    12371237            if units is not None: 
    12381238                toks = variable.split('.') 
    1239                 # TODO: why split() when accessing unit, but not when setting value? 
    12401239                local_unit = getattr(storage, toks[0]+"_unit") 
    12411240                if local_unit is not None and units.lower() != local_unit.lower(): 
  • src/sas/sascalc/dataloader/readers/cansas_reader_HDF5.py

    r7b50f14 r2b538cd  
    226226 
    227227                for data_point in data_set: 
    228                     if data_point.dtype.char == 'S': 
    229                         data_point = decode(bytes(data_point)) 
     228                    if isinstance(data_point, np.ndarray): 
     229                        if data_point.dtype.char == 'S': 
     230                            data_point = decode(bytes(data_point)) 
     231                    else: 
     232                        data_point = decode(data_point) 
    230233                    # Top Level Meta Data 
    231234                    if key == u'definition': 
Note: See TracChangeset for help on using the changeset viewer.