From 433a3ddcd0757b2b55754f61eddaa3020fc5a479 Mon Sep 17 00:00:00 2001 From: fjosw Date: Mon, 6 Dec 2021 15:21:48 +0000 Subject: [PATCH] Documentation updated --- docs/pyerrors/obs.html | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/docs/pyerrors/obs.html b/docs/pyerrors/obs.html index 66b95288..9468f8a1 100644 --- a/docs/pyerrors/obs.html +++ b/docs/pyerrors/obs.html @@ -404,8 +404,11 @@ if name_length > 1: if name_length != len(set(names)): raise Exception('names are not unique.') - if not all(isinstance(x, str) for x in names): - raise TypeError('All names have to be strings.') + if not all(isinstance(x, str) for x in names): + raise TypeError('All names have to be strings.') + else: + if not isinstance(names[0], str): + raise TypeError('All names have to be strings.') if min(len(x) for x in samples) <= 4: raise Exception('Samples have to have at least 5 entries.') @@ -2105,8 +2108,11 @@ if name_length > 1: if name_length != len(set(names)): raise Exception('names are not unique.') - if not all(isinstance(x, str) for x in names): - raise TypeError('All names have to be strings.') + if not all(isinstance(x, str) for x in names): + raise TypeError('All names have to be strings.') + else: + if not isinstance(names[0], str): + raise TypeError('All names have to be strings.') if min(len(x) for x in samples) <= 4: raise Exception('Samples have to have at least 5 entries.') @@ -2900,8 +2906,11 @@ this overwrites the standard value for that ensemble. if name_length > 1: if name_length != len(set(names)): raise Exception('names are not unique.') - if not all(isinstance(x, str) for x in names): - raise TypeError('All names have to be strings.') + if not all(isinstance(x, str) for x in names): + raise TypeError('All names have to be strings.') + else: + if not isinstance(names[0], str): + raise TypeError('All names have to be strings.') if min(len(x) for x in samples) <= 4: raise Exception('Samples have to have at least 5 entries.')