1666e3ac5a46912b5e16f452e39bfdcf028e59ae,hyperspy/io_plugins/usid_hdf5.py,,_get_dim_dict,#Any#Any#Any#Any#,38

Before Change


                // often we end up here. In most cases,
                step_avg = step_size.max()
                step_size -= step_avg
                var = np.mean(np.abs(step_size))
                if var / step_avg < 1E-3:
                    step_size = [step_avg]
                else:
                    // Non-linear dimension! - see notes above

After Change


            // Empty dimension!
            continue
        else:
            try:
                step_size = usid.write_utils.get_slope(dim_vals)
            except ValueError:
                // Non-linear dimension! - see notes above
                if ignore_non_linear_dims:
                    warn("Ignoring non-linearity of dimension: "
                         "{}".format(dim_name))
                    step_size = 1
                    dim_vals[0] = 0
                else:
                    raise ValueError("Cannot load provided dataset. "
                                     "Parameter: {} was varied "
                                     "non-linearly. Supply keyword "
                                     "argument "ignore_non_linear_dims="
                                     "True" to ignore this "
                                     "error".format(dim_name))

        dim_dict[dim_name] = {"size": len(dim_vals),
                              "name": dim_name,
                              "units": units,
                              "scale": step_size,
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: hyperspy/hyperspy
Commit Name: 1666e3ac5a46912b5e16f452e39bfdcf028e59ae
Time: 2019-05-09
Author: 14300780+ssomnath@users.noreply.github.com
File Name: hyperspy/io_plugins/usid_hdf5.py
Class Name:
Method Name: _get_dim_dict


Project Name: nilmtk/nilmtk
Commit Name: b523b464d8cafe29e352981c1c6df941f205592a
Time: 2014-07-09
Author: jack-list@xlk.org.uk
File Name: nilmtk/metrics.py
Class Name:
Method Name: mean_normalized_error_power


Project Name: mne-tools/mne-python
Commit Name: 0e5ec90ebc3a5d428ef3a80aa9c3f14ee5329c0d
Time: 2020-08-03
Author: larson.eric.d@gmail.com
File Name: mne/io/fieldtrip/utils.py
Class Name:
Method Name: _set_sfreq