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)
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)
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
def test2Darray_latex(self): s = get_2Dtable_string(self.data2D, self.rownames, self.colnames, line_end='\\\\', col_sep='&') if 0: print 's:' print s
def test3Darray(self): s = get_2Dtable_string(self.data3D, self.rownames, self.colnames) if 0: print s
def test2Darray(self): s = get_2Dtable_string(self.data2D, self.rownames, self.colnames)
def test1Darray(self): s = get_2Dtable_string(self.data1D, self.rownames, ['Value'])