Exemple #1
0
 def _parse_output_result_variables(self, result_variables):
     result_var = []
     jvmV = self.sds_context.java_gateway.jvm
     for idx, v in enumerate(self._script.out_var_name):
         out_type = self._outputs[idx].output_type
         if out_type == OutputType.MATRIX:
             result_var.append(
                 matrix_block_to_numpy(jvmV,
                                       result_variables.getMatrixBlock(v)))
         elif out_type == OutputType.FRAME:
             result_var.append(
                 frame_block_to_pandas(jvmV,
                                       result_variables.getFrameBlock(v)))
         elif out_type == OutputType.DOUBLE:
             result_var.append(result_variables.getDouble(v))
         else:
             raise NotImplementedError("Not Implemented Support of type" +
                                       out_type)
     return result_var
Exemple #2
0
 def _parse_output_result_variables(self, result_variables):
     return frame_block_to_pandas(self.sds_context, result_variables.getFrameBlock(self._script.out_var_name[0]))
Exemple #3
0
 def __parse_output_result_frame(self, result_variables, var_name):
     return frame_block_to_pandas(self.sds_context,
                                  result_variables.getFrameBlock(var_name))