Skip to content

Commit

Permalink
Merge pull request #127 from lmassach/master
Browse files Browse the repository at this point in the history
Support numpy version 2
  • Loading branch information
uvemas authored Jul 20, 2024
2 parents eb07136 + 7566093 commit 319271e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion vitables/nodeprops/attrpropdlg.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def fillSysAttrsPage(self, info):
# isinstance(asi.test, int) returns True
# asi.test.shape returns ()
# asi.test2 = "hello" ->
# type(asi.test2) returns numpy.string_
# type(asi.test2) returns numpy.bytes_
# isinstance(asi.test2, str) returns True
# asi.test2.shape returns ()
# Beware that objects whose shape is () are not warranted
Expand Down
2 changes: 1 addition & 1 deletion vitables/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ def formatArrayContent(content):
:Parameter content: the ``numpy`` array contained in the view cell
"""

if isinstance(content, numpy.string_):
if isinstance(content, numpy.bytes_):
try:
return content.decode(DEFAULT_ENCODING)
except UnicodeDecodeError:
Expand Down

0 comments on commit 319271e

Please sign in to comment.