Skip to content

Commit b0948b6

Browse files
committed
fix for masked array
1 parent df96dc3 commit b0948b6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

hexrd/wppf/amorphous.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,10 @@ def tth_list(self):
160160

161161
@tth_list.setter
162162
def tth_list(self, val):
163-
if isinstance(val, np.ndarray):
163+
if isinstance(val, np.ma.MaskedArray):
164+
print('here')
165+
self._tth_list = val.filled()
166+
elif isinstance(val, np.ndarray):
164167
self._tth_list = val
165168
elif isinstance(val, (list, tuple)):
166169
self._tth_list = np.array(val)
@@ -313,6 +316,7 @@ def amorphous_lineout(self):
313316
for key in self.center:
314317
p = np.hstack((self.center[key],
315318
self.fwhm[key]))
319+
316320
lo += self.scale[key]*self.peak_model(p, self.tth_list)
317321

318322
return lo

0 commit comments

Comments
 (0)