Example #1
0
 def get_string_value(self, v):
     if v.size == 1:
         return "%1.4f" % v[0]
     if self.axes_names is not None and "condition" == self.axes_names[0]:
         cNames = self.dataInput.cNames
         if v.ndim == 1:
             return get_2Dtable_string(v, cNames, ["Value"])
         else:
             # print 'cNames:', cNames
             # print 'v.shape:', v.shape
             v = v[: len(cNames), :]
             return get_2Dtable_string(v.reshape(v.shape[0], 1, -1), cNames, ["Value"])
     else:
         return array_summary(v)
Example #2
0
 def get_string_value(self, v):
     if v.size == 1:
         return '%1.4f' % v[0]
     if self.axes_names is not None and 'condition' == self.axes_names[0]:
         cNames = self.dataInput.cNames
         if v.ndim == 1:
             return get_2Dtable_string(v, cNames, ['Value'])
         else:
             # print 'cNames:', cNames
             # print 'v.shape:', v.shape
             v = v[:len(cNames), :]
             return get_2Dtable_string(v.reshape(v.shape[0], 1, -1), cNames,
                                       ['Value'])
     else:
         return array_summary(v)
Example #3
0
 def test4Darray(self):
     s = get_2Dtable_string(self.data3D, self.rownames, self.colnames,
                            precision=2, outline_char='-', line_end='|',
                            line_start='|')
     if 0:
         print ''
         print s
Example #4
0
 def test4Darray(self):
     s = get_2Dtable_string(self.data3D, self.rownames, self.colnames,
                            precision=2, outline_char='-', line_end='|',
                            line_start='|')
     if 0:
         print ''
         print s
Example #5
0
 def test2Darray_latex(self):
     s = get_2Dtable_string(self.data2D, self.rownames, self.colnames,
                            line_end='\\\\', col_sep='&')
     if 0:
         print 's:'
         print s
Example #6
0
 def test3Darray(self):
     s = get_2Dtable_string(self.data3D, self.rownames, self.colnames)
     if 0:
         print s
Example #7
0
 def test2Darray(self):
     s = get_2Dtable_string(self.data2D, self.rownames, self.colnames)
Example #8
0
 def test1Darray(self):
     s = get_2Dtable_string(self.data1D, self.rownames, ['Value'])
Example #9
0
 def test2Darray_latex(self):
     s = get_2Dtable_string(self.data2D, self.rownames, self.colnames,
                            line_end='\\\\', col_sep='&')
     if 0:
         print 's:'
         print s
Example #10
0
 def test3Darray(self):
     s = get_2Dtable_string(self.data3D, self.rownames, self.colnames)
     if 0:
         print s
Example #11
0
 def test2Darray(self):
     s = get_2Dtable_string(self.data2D, self.rownames, self.colnames)
Example #12
0
 def test1Darray(self):
     s = get_2Dtable_string(self.data1D, self.rownames, ['Value'])