diff --git a/pyebsdindex/nlpar_cpu.py b/pyebsdindex/nlpar_cpu.py index f9a2a1b..cf7e19c 100644 --- a/pyebsdindex/nlpar_cpu.py +++ b/pyebsdindex/nlpar_cpu.py @@ -326,6 +326,9 @@ def calcnlpar(self, chunksize=0, searchradius=None, lam = None, dthresh = None, sr = np.int64(self.searchradius) diff_offset = np.float32(self.diff_offset) + if type(diff_offset) is np.ndarray: + diff_offset = np.float32(diff_offset[0]) + if filename is not None: self.setfile(filepath=filename)