Skip to content

Commit a6e1bd7

Browse files
committed
cleanup
1 parent 5bc93c9 commit a6e1bd7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/sasctl/utils/pymas/core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def build_wrapper_function(func, variables, array_input, setup=None,
6969
if array_input:
7070
middle = string_input +\
7171
(' inputarray = np.array([{}]).reshape((1, -1))'.format(','.join(args)),
72-
' column = [{}]'.format(','.join(str(w) for w in args)),
72+
' column = [{}]'.format(','.join('"{0}"'.format(w) for w in args)),
7373
' import pandas as pd',
7474
' inputrun = pd.DataFrame(data=inputarray, columns=column)',
7575
' result = {}(inputrun)'.format(func))

tests/integration/test_pymas.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,9 +186,9 @@ def test_from_pickle(train_data, pickle_file):
186186
rc = py.appendSrcLine(' import numpy as np');
187187
rc = py.appendSrcLine('');
188188
rc = py.appendSrcLine(' inputarray = np.array([SepalLength,SepalWidth,PetalLength,PetalWidth]).reshape((1, -1))');
189-
rc = py.appendSrcLine(' column=["SepalLength","SepalWidth","PetalLength","PetalWidth"]');
189+
rc = py.appendSrcLine(' column = ["SepalLength","SepalWidth","PetalLength","PetalWidth"]');
190190
rc = py.appendSrcLine(' import pandas as pd');
191-
rc = py.appendSrcLine(' inputrun=pd.DataFrame(data=inputarray, columns=column)');
191+
rc = py.appendSrcLine(' inputrun = pd.DataFrame(data=inputarray, columns=column)');
192192
rc = py.appendSrcLine(' result = obj.predict(inputrun)');
193193
rc = py.appendSrcLine(' if result.size == 1:');
194194
rc = py.appendSrcLine(' result = np.asscalar(result)');

0 commit comments

Comments
 (0)