clarified text of error message complaining about wrong input dimension
This commit is contained in:
parent
858e322e06
commit
b933359f17
|
@ -110,7 +110,7 @@ for name in filenames:
|
||||||
remarks = []
|
remarks = []
|
||||||
|
|
||||||
if table.label_dimension(options.coords) != 3: errors.append('coordinates {} are not a vector.'.format(options.coords))
|
if table.label_dimension(options.coords) != 3: errors.append('coordinates {} are not a vector.'.format(options.coords))
|
||||||
if not np.all(table.label_dimension(label) == dim): errors.append('input {} has wrong dimension {}.'.format(label,dim))
|
if not np.all(table.label_dimension(label) == dim): errors.append('input {} does not have dimension {}.'.format(label,dim))
|
||||||
else: column = table.label_index(label)
|
else: column = table.label_index(label)
|
||||||
|
|
||||||
if remarks != []: damask.util.croak(remarks)
|
if remarks != []: damask.util.croak(remarks)
|
||||||
|
|
|
@ -99,7 +99,7 @@ for name in filenames:
|
||||||
# ------------------------------------------ sanity checks ----------------------------------------
|
# ------------------------------------------ sanity checks ----------------------------------------
|
||||||
|
|
||||||
if not np.all(table.label_dimension(label) == dim):
|
if not np.all(table.label_dimension(label) == dim):
|
||||||
damask.util.croak('input {} has wrong dimension {}.'.format(label,dim))
|
damask.util.croak('input {} does not have dimension {}.'.format(label,dim))
|
||||||
table.close(dismiss = True) # close ASCIItable and remove empty file
|
table.close(dismiss = True) # close ASCIItable and remove empty file
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
|
|
@ -113,7 +113,7 @@ for name in filenames:
|
||||||
errors = []
|
errors = []
|
||||||
remarks = []
|
remarks = []
|
||||||
|
|
||||||
if not np.all(table.label_dimension(label) == dim): errors.append('input {} has wrong dimension {}.'.format(label,dim))
|
if not np.all(table.label_dimension(label) == dim): errors.append('input {} does not have dimension {}.'.format(label,dim))
|
||||||
else: column = table.label_index(label)
|
else: column = table.label_index(label)
|
||||||
|
|
||||||
if remarks != []: damask.util.croak(remarks)
|
if remarks != []: damask.util.croak(remarks)
|
||||||
|
|
|
@ -101,7 +101,7 @@ for name in filenames:
|
||||||
errors = []
|
errors = []
|
||||||
remarks = []
|
remarks = []
|
||||||
|
|
||||||
if not np.all(table.label_dimension(label) == dim): errors.append('input {} has wrong dimension {}.'.format(label,dim))
|
if not np.all(table.label_dimension(label) == dim): errors.append('input {} does not have dimension {}.'.format(label,dim))
|
||||||
else: column = table.label_index(label)
|
else: column = table.label_index(label)
|
||||||
|
|
||||||
if remarks != []: damask.util.croak(remarks)
|
if remarks != []: damask.util.croak(remarks)
|
||||||
|
|
|
@ -98,7 +98,7 @@ for name in filenames:
|
||||||
errors.append('column{} {} not found'.format('s' if len(missing_labels) > 1 else '',
|
errors.append('column{} {} not found'.format('s' if len(missing_labels) > 1 else '',
|
||||||
', '.join(missing_labels)))
|
', '.join(missing_labels)))
|
||||||
if table.label_dimension(options.label) != 3:
|
if table.label_dimension(options.label) != 3:
|
||||||
errors.append('column {} has wrong dimension'.format(options.label))
|
errors.append('column {} does not have dimension'.format(options.label))
|
||||||
|
|
||||||
if errors != []:
|
if errors != []:
|
||||||
damask.util.croak(errors)
|
damask.util.croak(errors)
|
||||||
|
|
Loading…
Reference in New Issue