plump_qcvar¶
- psi4.driver.p4util.plump_qcvar(val, shape_clue, ret='np')[source]¶
Prepare serialized QCVariable for
set_variable()by converting flat arrays into shaped ones and floating strings.- Parameters:
val (
Union[float,str,List]) – flat (?, ) list or scalar or string, probably from JSON storage.shape_clue (
str) – Label that includes (case insensitive) one of the following as a clue to the array’s natural dimensions: ‘gradient’, ‘hessian’ret (
str) – {‘np’, ‘psi4’} Whether for arrays to returnnumpy.ndarrayorpsi4.core.Matrix.
- Returns:
Reshaped array of type ret with natural dimensions of shape_clue.
- Return type:
float or numpy.ndarray or Matrix