Created
June 14, 2017 09:28
-
-
Save thomasaarholt/a01c612adc30317a4c9ee5dadf6dffcf to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--------------------------------------------------------------------------- | |
IndexError Traceback (most recent call last) | |
<ipython-input-4-f890f17f75fd> in <module>() | |
----> 1 s.align_zero_loss_peak() | |
C:\ProgramData\Miniconda3\lib\site-packages\hyperspy\_signals\eels.py in align_zero_loss_peak(self, calibrate, also_align, print_stats, subpixel, mask, signal_range, show_progressbar, **kwargs) | |
287 | |
288 zlpc = estimate_zero_loss_peak_centre(self, mask, signal_range) | |
--> 289 mean_ = without_nans(zlpc.data).mean() | |
290 if print_stats is True: | |
291 print() | |
C:\ProgramData\Miniconda3\lib\site-packages\hyperspy\misc\utils.py in without_nans(data) | |
753 | |
754 def without_nans(data): | |
--> 755 return data[~np.isnan(data)] | |
756 | |
757 | |
C:\ProgramData\Miniconda3\lib\site-packages\dask\array\core.py in __getitem__(self, index) | |
1236 return self | |
1237 | |
-> 1238 dsk, chunks = slice_array(out, self.name, self.chunks, index) | |
1239 | |
1240 dsk2 = sharedict.merge(self.dask, (out, dsk)) | |
C:\ProgramData\Miniconda3\lib\site-packages\dask\array\slicing.py in slice_array(out_name, in_name, blockdims, index) | |
158 | |
159 # Pass down to next function | |
--> 160 dsk_out, bd_out = slice_with_newaxes(out_name, in_name, blockdims, index) | |
161 | |
162 bd_out = tuple(map(tuple, bd_out)) | |
C:\ProgramData\Miniconda3\lib\site-packages\dask\array\slicing.py in slice_with_newaxes(out_name, in_name, blockdims, index) | |
180 | |
181 # Pass down and do work | |
--> 182 dsk, blockdims2 = slice_wrap_lists(out_name, in_name, blockdims, index2) | |
183 | |
184 if where_none: | |
C:\ProgramData\Miniconda3\lib\site-packages\dask\array\slicing.py in slice_wrap_lists(out_name, in_name, blockdims, index) | |
223 | |
224 for bd_size, i in zip(shape, index): | |
--> 225 check_index(i, bd_size) | |
226 | |
227 # Change indices like -1 to 9 | |
C:\ProgramData\Miniconda3\lib\site-packages\dask\array\slicing.py in check_index(ind, dimension) | |
731 x = np.asanyarray(ind) | |
732 if (x >= dimension).any() or (x < -dimension).any(): | |
--> 733 raise IndexError("Index out of bounds %s" % dimension) | |
734 elif isinstance(ind, slice): | |
735 return | |
IndexError: Index out of bounds 382 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment