proper return value when lacking lattice information

This commit is contained in:
Philip Eisenlohr 2023-10-24 15:00:19 -04:00
parent 926d86935f
commit 934835f93c
1 changed files with 2 additions and 2 deletions

View File

@ -565,9 +565,9 @@ class Crystal():
self.family == other.family)
@property
def parameters(self) -> Tuple:
def parameters(self) -> Optional[Tuple]:
"""Return lattice parameters a, b, c, alpha, beta, gamma."""
return (self.a,self.b,self.c,self.alpha,self.beta,self.gamma) if hasattr(self,'a') else ()
return (self.a,self.b,self.c,self.alpha,self.beta,self.gamma) if hasattr(self,'a') else None
@property
def immutable(self) -> Dict[str, float]: