default string formatting in Data View of Scientific mode

Hi,

I often use the Data View tab of the SciView toolbar to look at data frames and arrays. Many of my arrays contain very small values, in which case the default string formatting of '%.5f' is not helpful. Is there a way to change the default formatting to exponential/scientific notation, e.g. '%.5e'? I could not find anything about it in the settings or the SciView tutorials.

Thanks!

4 comments
Comment actions Permalink

Afaik there's no such settings, it might be a good feature request. Could you please provide a code sample and a screenshot demonstrating the issue?

0
Comment actions Permalink

Thanks for the quick answer! Here is an array, with for example very large and very small probabilities.

import numpy as np
probs = np.array([7.77558451e-08, 2.46938173e-13, 9.99999924e-01, 2.46938173e-13, 9.99996511e-01])

With the default formatting of '%.5f' the probabilities get rounded to 0s and 1s


When the formatting is changed to '%.5e', the difference in the values is immediately apparent:

The fact that it can be changed in the first place is great. It would just save a lot of time not having to change the formatting each a new data view is opened. There might also be other cases where a different default formatting could be advantageous. Somebody working with lots of hexadecimal data comes to my mind for example. So could be general enough to be worth considering?
Thanks a lot

0
Comment actions Permalink

Thank you, I submitted a feature request https://youtrack.jetbrains.com/issue/PY-44817

Please follow the issue for updates, feel free to vote and comment, and let us know if you need any help. If you're not familiar with YouTrack, please see https://intellij-support.jetbrains.com/hc/en-us/articles/207241135-How-to-follow-YouTrack-issues-and-receive-notifications

0
Comment actions Permalink

Great, thanks! I'll keep an eye on the feature request

0

Please sign in to leave a comment.