def _idcheck(self, idpac):
"""Check the idpac parameter."""
idpac = np.atleast_1d(idpac)
self._csuro = True
if not all([isinstance(k, int) for k in idpac]) and (len(idpac) != 3):
raise ValueError("idpac must be a tuple/list of 3 integers.")
else:
# Ozkurt PAC case :
if idpac[0] == 4:
idpac = np.array([4, 0, 0])
self._csuro = False
if (idpac[1] == 0) or (idpac[2] == 0):
self._csuro = False
idpac = (idpac[0], 0, 0)
self._idpac = idpac
self.method, self.surro, self.norm = pacstr(idpac)
评论列表
文章目录