def get_result_as_array(self):
if self.formatter is not None:<EOL><INDENT>return np.array([self.formatter(x) for x in self.values])<EOL><DEDENT>if self.fixed_width:<EOL><INDENT>threshold = get_option("<STR_LIT>")<EOL><DEDENT>else:<EOL><INDENT>threshold = None<EOL><DEDENT>def format_values_with(float_format):<EOL><INDENT>formatter = self._value_formatter(float_format, threshold)<EOL>if self.justify == '<STR_LIT:left>':<EOL><INDENT>na_rep = '<STR_LIT:U+0020>' + self.na_rep<EOL><DEDENT>else:<EOL><INDENT>na_rep = self.na_rep<EOL><DEDENT>values = self.values<EOL>is_complex = is_complex_dtype(values)<EOL>mask = isna(values)<EOL>if hasattr(values, '<STR_LIT>'):  <EOL><INDENT>values = values.to_dense()<EOL><DEDENT>values = np.array(values, dtype='<STR_LIT:object>')<EOL>values[mask] = na_rep<EOL>imask = (~mask).ravel()<EOL>values.flat[imask] = np.array([formatter(val)<EOL>for val in values.ravel()[imask]])<EOL>if self.fixed_width:<EOL><INDENT>if is_complex:<EOL><INDENT>return _trim_zeros_complex(values, na_rep)<EOL><DEDENT>else:<EOL><INDENT>return _trim_zeros_float(values, na_rep)<EOL><DEDENT><DEDENT>return values<EOL><DEDENT>if self.float_format is None:<EOL><INDENT>if self.fixed_width:<EOL><INDENT>float_format = partial('<STR_LIT>'.format,<EOL>digits=self.digits)<EOL><DEDENT>else:<EOL><INDENT>float_format = self.float_format<EOL><DEDENT><DEDENT>else:<EOL><INDENT>float_format = lambda value: self.float_format % value<EOL><DEDENT>formatted_values = format_values_with(float_format)<EOL>if not self.fixed_width:<EOL><INDENT>return formatted_values<EOL><DEDENT>if len(formatted_values) > <NUM_LIT:0>:<EOL><INDENT>maxlen = max(len(x) for x in formatted_values)<EOL>too_long = maxlen > self.digits + <NUM_LIT:6><EOL><DEDENT>else:<EOL><INDENT>too_long = False<EOL><DEDENT>with np.errstate(invalid='<STR_LIT:ignore>'):<EOL><INDENT>abs_vals = np.abs(self.values)<EOL>has_large_values = (abs_vals > <NUM_LIT>).any()<EOL>has_small_values = ((abs_vals < <NUM_LIT:10>**(-self.digits)) &<EOL>(abs_vals > <NUM_LIT:0>)).any()<EOL><DEDENT>if has_small_values or (too_long and has_large_values):<EOL><INDENT>float_format = partial('<STR_LIT>'.format,<EOL>digits=self.digits)<EOL>formatted_values = format_values_with(float_format)<EOL><DEDENT>return formatted_values<EOL>
Returns the float values converted into strings using
the parameters given at initialisation, as a numpy array