Changeset 9fb4572 in sasview for src


Ignore:
Timestamp:
Oct 18, 2018 11:43:55 AM (6 years ago)
Author:
krzywon
Branches:
master, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, unittest-saveload
Children:
9f45f83, 0863065
Parents:
845144e
Message:

Reinstate shape check.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sascalc/dataloader/file_reader_base_class.py

    rb1ec23d r9fb4572  
    231231                    data.mask = data.mask.astype(dtype=bool) 
    232232 
    233                 n_rows, n_cols = data.data.shape 
    234                 data.y_bins = data.qy_data[0::int(n_cols)] 
    235                 data.x_bins = data.qx_data[:int(n_cols)] 
    236                 data.data = data.data.flatten() 
     233                if len(data.data.shape) == 2: 
     234                    n_rows, n_cols = data.data.shape 
     235                    data.y_bins = data.qy_data[0::int(n_cols)] 
     236                    data.x_bins = data.qx_data[:int(n_cols)] 
     237                    data.data = data.data.flatten() 
    237238                data = self._remove_nans_in_data(data) 
    238239                if len(data.data) > 0: 
Note: See TracChangeset for help on using the changeset viewer.