Skip to content

TODO: Rework LongFloatFormat formatting (for whitespaces and more) #9699

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ahaldane opened this issue Sep 17, 2017 · 1 comment
Closed

TODO: Rework LongFloatFormat formatting (for whitespaces and more) #9699

ahaldane opened this issue Sep 17, 2017 · 1 comment

Comments

@ahaldane
Copy link
Member

ahaldane commented Sep 17, 2017

This is a reminder that as a followup to #9139, we want to recode the LongFloatFormat formatter in arrayprint.py so that it behaves more like the FloatFormat, for example it should now omit whitespace in the sign position if possible.

Ideally would be done before 1.14 release.

Implementation idea: Probably we should try to re-use the FloatFormat code, eg by subclassing it. The only part of FloatFormat we need to change is to use C's printf instead of python's printf-like formatter, since only the former supports the l specifier. That means about 3-4 lines need to change in FloatFormat to adapt it to LongFloatFormat. It looks like we may want to use the C-level format_longdouble function.

@ahaldane
Copy link
Member Author

ahaldane commented Nov 5, 2017

Closed by #9941

@ahaldane ahaldane closed this as completed Nov 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant