bundles / scipy latest / scipy / io / _harwell_boeing / _fortran_format_parser / ExpFormat / from_number
classmethod
scipy.io._harwell_boeing._fortran_format_parser:ExpFormat.from_number
source: /scipy/io/_harwell_boeing/_fortran_format_parser.py :97
Summary
Given a float number, returns a "reasonable" ExpFormat instance to represent any number between -n and n.
Parameters
n: floatmax number one wants to be able to represent
min: intminimum number of characters to use for the format
Returns
res: ExpFormatExpFormat instance with reasonable (see Notes) computed width
Notes
Reasonable should be understood as the minimal string length necessary to avoid losing precision.
Aliases
-
scipy.io._harwell_boeing._fortran_format_parser.ExpFormat.from_number