Skip to content

Commit

Permalink
Variable Explorer: Fix error when inserting items in dataframeeditor
Browse files Browse the repository at this point in the history
- This error was due to a comparison for the item's value that was not
specific enough.
- It started to appear with Numpy 2.2.0, which raises a ValueError for
comparisons with empty arrays.
  • Loading branch information
ccordoba12 committed Dec 9, 2024
1 parent a0e3261 commit ce927ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spyder/plugins/variableexplorer/widgets/dataframeeditor.py
Original file line number Diff line number Diff line change
Expand Up @@ -1143,7 +1143,7 @@ def insert_item(self, axis=0, before_above=False):
new_name = self.next_index_name(indexes, new_name)

item_value = eval(eval_type)
if item_value == ():
if isinstance(item_value, tuple) and item_value == ():
item_value = ('')

df.insert(
Expand Down

0 comments on commit ce927ac

Please sign in to comment.