We welcome Python questions in the JMP blogs. I have been answering a lot of them lately. Including sample code, and discussions on how best to use Python in JMP to its best advantage.
@txnelson comment on asking the Python community is a valid one, as would asking statistical blogs. Though instead of asking how to replicate JSL's 'Vec Quadratic()' you phrase it in terms of asking how to graph the results you want, how to do the statistics you want in Python.
As for answering this specific ask, I can't help you. I have no knowledge of how 'Vec Quadratic()' works internally. But I can tell you what the Scripting Index says. The scripting index definition of Vec Quadratic( S, X ) states it evaluates as Vec Diag ( X * S * X ). Vec Diag( X ) description in the Scripting index is Returns the diagonal elements of the square matrix as a vector. Unless I'm missing something that appears to be straightforward matrix math.
As for how do I call 'Vec Quadriatic()' from my Python program running in JMP so I can further process the results... That is the kind of question that would be interesting.
You can use a numpy array for S and X and you can do the Python Get(S), Python Get(X) to get the numpy array values into JSL environment as a JSL Matrix. And you can call jmp.run_jsl( 'Vec Quadratic( S, X)' ). Then from Python in JMP you can get the column results directly from the data table in Python. See the Scripting Index on jmp.DataTable and jmp.DataTable.Column objects.
Derived from the JSL "Vec Quadratic()' example in the Scripting Index.
import jmp
import numpy as np
s = np.array( [[1,3,5],[3,2,6], [5,6,1] ])
x = np.array( [[1,3,5],[2,4,6] ])
jmp.run_jsl('''
S = Python Get(s);
X = Python Get(x);
show(Vec Quadratic(S, X));
''')
giving results
/*:
//:*/
S = Python Get(s);
X = Python Get(x);
show(Vec Quadratic(S, X));
/*:
Vec Quadratic(S, X) = [292, 528];