-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
In the if/else loop the optional argument set to None will return an assert error:
dataMerge/datamerge/dataclasses.py
Lines 190 to 214 in 0ce1b25
| if maskArray is None: | |
| return pd.DataFrame( | |
| data={ | |
| "Q": self.Q, | |
| "QSigma": self.QSigma, | |
| "I": self.I * scaling, | |
| "ISigma": self.ISigma * scaling, | |
| "mask": self.Mask, | |
| } | |
| ).copy() | |
| if isinstance(maskArray, np.ndarray): | |
| assert ( | |
| maskArray.shape == self.Q.shape | |
| ), "Mask array supplied to scatteringDataObj.asPandas must conform to the data shape" | |
| return pd.DataFrame( | |
| data={ | |
| "Q": self.Q[~maskArray], | |
| "QSigma": self.QSigma[~maskArray], | |
| "I": self.I[~maskArray] * scaling, | |
| "ISigma": self.ISigma[~maskArray] * scaling, | |
| "mask": self.Mask[~maskArray], | |
| } | |
| ).copy() | |
| else: | |
| assert False, "No valid mask array fed into scatteringDataObj.asPandas()" |
probably what was wanted is the second 'if' clause to be 'elif'?
Metadata
Metadata
Assignees
Labels
No labels