Skip to content

Commit ffa8ace

Browse files
committed
adding one more check for empty arrays.
1 parent 3c46189 commit ffa8ace

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

hexrd/instrument/hedm_instrument.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2848,8 +2848,9 @@ def _extract_ring_line_positions(iter_args, instr_cfg, panel, eta_tol, npdiv,
28482848
# going to do another round of masking to get rid of those
28492849
nan_mask = ~np.logical_or(np.isnan(xys), np.isnan(angs))
28502850
nan_mask = np.logical_or.reduce(nan_mask, 1)
2851-
angs = angs[nan_mask,:]
2852-
xys = xys[nan_mask, :]
2851+
if angs.ndim > 1 and xys.ndim > 1:
2852+
angs = angs[nan_mask,:]
2853+
xys = xys[nan_mask, :]
28532854

28542855
n_images = len(images)
28552856
native_area = panel.pixel_area

0 commit comments

Comments
 (0)