Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
Description
Improve readability of StringIdentifier and DataExpression toString methods.
For example, A = matrix("1 2 3 4 5 6", rows=3, cols=2) results in a DMLProgram that contains:
A = RAND(,lambda=1.0,min=1 2 3 4 5 6,pdf=uniform,seed=-1,max=1 2 3 4 5 6,sparsity=1.0,rows=3,cols=2 );
The extraneous first comma within RAND is confusing. Additionally, the string '1 2 3 4 5 6' is not surrounded by quotes, which affects readability.
Readability is improved if the toStrings are modified to produce output such as the following:
A = RAND(lambda=1.0, min='1 2 3 4 5 6', pdf='uniform', seed=-1, max='1 2 3 4 5 6', sparsity=1.0, rows=3, cols=2);