From 1dbb400d9ccee95bdd1473ac0988216df2a355fd Mon Sep 17 00:00:00 2001 From: dmt <> Date: Thu, 10 Oct 2019 17:52:31 +0200 Subject: [PATCH] Check if the user provided TZ, TSigma or ZSigma relatives. --- cml/ports/source_adapters.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cml/ports/source_adapters.py b/cml/ports/source_adapters.py index 3f01a43..d769fbc 100644 --- a/cml/ports/source_adapters.py +++ b/cml/ports/source_adapters.py @@ -54,16 +54,17 @@ class PandasBlock: def get_values(self, **kwargs): t, z, sigma = kwargs.get("T"), kwargs.get("Z"), kwargs.get("Sigma") - if t and z: + + if t is not None and z is not None: data_frame = self.__data_block.loc[ (self.__data_block["T"] == t) & (self.__data_block["Z"] == z)] - elif t and sigma: + elif t is not None and sigma is not None: data_frame = self.__data_block.loc[ (self.__data_block["T"] == t) & ( self.__data_block["Sigma"] == sigma)] - elif z and sigma: + elif z is not None and sigma is not None: data_frame = self.__data_block.loc[ (self.__data_block["Z"] == z) & ( self.__data_block["Sigma"] == sigma)] -- GitLab