diff --git a/vitables/csv/csvutils.py b/vitables/csv/csvutils.py index 0cda2f29..c012e724 100644 --- a/vitables/csv/csvutils.py +++ b/vitables/csv/csvutils.py @@ -36,7 +36,7 @@ # https://github.com/numpy/numpy/issues/10990 import warnings -warnings.filterwarnings("ignore", category=numpy.VisibleDeprecationWarning) +warnings.filterwarnings("ignore", category=numpy.exceptions.VisibleDeprecationWarning) translate = QtWidgets.QApplication.translate diff --git a/vitables/nodeprops/attrpropdlg.py b/vitables/nodeprops/attrpropdlg.py index d2b7a9ca..3b67a150 100644 --- a/vitables/nodeprops/attrpropdlg.py +++ b/vitables/nodeprops/attrpropdlg.py @@ -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 diff --git a/vitables/utils.py b/vitables/utils.py index 11f616ee..c0b4b308 100644 --- a/vitables/utils.py +++ b/vitables/utils.py @@ -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: