Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e3d70c0

Browse files
committed
Turn numpy deprecation warnings into errors
By defining a macro in setupext.py
1 parent 514899e commit e3d70c0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

setupext.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -824,6 +824,9 @@ def add_flags(self, ext):
824824
ext.define_macros.append(('PY_ARRAY_UNIQUE_SYMBOL', array_api_name))
825825
ext.add_hook('include_dirs', self.include_dirs_hook)
826826

827+
ext.define_macros.append(('NPY_NO_DEPRECATED_API',
828+
'NPY_1_7_API_VERSION'))
829+
827830
def get_setup_requires(self):
828831
return ['numpy>=1.6']
829832

0 commit comments

Comments
 (0)