-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Format (d) is incorrect in Numpy array viewer #22629
Comments
The Variable Explorer currently supports specifying the format only for floats. I think this is the most common use case, but I can imagine users wanting to specify the format for other types as well. |
The array editor preferences has the default value of d when this variable is opened up. So even if I do not enter anything in this field and just go into this menu to select use the default background color, I get the format (d) is incorrect error message. |
Aha, I missed that. Yes, that's clearly a bug. @PhilipYip1988 Do you want to have a go at fixing it? |
I fixed it locally by updating if dialog.float_format == 'd':
dialog.float_format = '.0f' |
That's great @PhilipYip1988! Would you like to submit a pull request for it? If you're interested in giving is a hand with this, please follow the instructions in our Contributing guide. |
Issue Report Checklist
conda update spyder
(orpip
, if not using Anaconda)jupyter qtconsole
(if console-related)spyder --reset
Problem Description
Variable explorer array editor preferences is expecting a float format specifier for an integer datatype. Giving format (d) is incorrect.
What steps reproduce the problem?
Open x in the variable explorer. Select display options:
Select OK:
Format (d) is incorrect error message:
What is the expected output? What do you see instead?
The array editor preferences is expecting the format specifier for a float instead of an int for an integer datatype. This should expect a format specifier for an int.
Paste Traceback/Error Below (if applicable)
Versions
Dependencies
The text was updated successfully, but these errors were encountered: