You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
raiseValueError(f"Integers cannot have precision. Please use the integer data type directly instead of {gene_type}.")
@@ -362,10 +366,8 @@ def __init__(self,
362
366
self.valid_parameters=False
363
367
raiseValueError(f"When the parameter 'gene_type' is nested, then it can be either [float, int<precision>] or with length equal to the value passed to the 'num_genes' parameter. Instead, value {gene_type} with len(gene_type) ({len(gene_type)}) != len(num_genes) ({num_genes}) found.")
# If the gene type is float and no precision is passed, set it to None.
367
-
gene_type[gene_type_idx] = [gene_type_val, None]
368
-
elifgene_type_valinGA.supported_int_types:
369
+
ifgene_type_valinGA.supported_int_float_types:
370
+
# If the gene type is float and no precision is passed or an integer, set its precision to None.
369
371
gene_type[gene_type_idx] = [gene_type_val, None]
370
372
eliftype(gene_type_val) in [list, tuple, numpy.ndarray]:
371
373
# A float type is expected in a list/tuple/numpy.ndarray of length 2.
@@ -376,6 +378,12 @@ def __init__(self,
376
378
else:
377
379
self.valid_parameters=False
378
380
raiseTypeError(f"In the 'gene_type' parameter, the precision for float gene data types must be an integer but the element {gene_type_val} at index {gene_type_idx} has a precision of {gene_type_val[1]} with type {gene_type_val[0]}.")
381
+
elifgene_type_val[0] inGA.supported_int_types:
382
+
ifgene_type_val[1] isNone:
383
+
pass
384
+
else:
385
+
self.valid_parameters=False
386
+
raiseTypeError(f"In the 'gene_type' parameter, either do not set a precision for integer data types or set it to None. But the element {gene_type_val} at index {gene_type_idx} has a precision of {gene_type_val[1]} with type {gene_type_val[0]}.")
0 commit comments