Create MachAr instance with found information on float types TODO: MachAr should be retired completely ideally. We currently only ever use it system with broken longdouble (valgrind, WSL).
(ftype)
| 362 | |
| 363 | |
| 364 | def _discovered_machar(ftype): |
| 365 | """ Create MachAr instance with found information on float types |
| 366 | |
| 367 | TODO: MachAr should be retired completely ideally. We currently only |
| 368 | ever use it system with broken longdouble (valgrind, WSL). |
| 369 | """ |
| 370 | params = _MACHAR_PARAMS[ftype] |
| 371 | return MachAr(lambda v: array([v], ftype), |
| 372 | lambda v:_fr0(v.astype(params['itype']))[0], |
| 373 | lambda v:array(_fr0(v)[0], ftype), |
| 374 | lambda v: params['fmt'] % array(_fr0(v)[0], ftype), |
| 375 | params['title']) |
| 376 | |
| 377 | |
| 378 | @set_module('numpy') |