Cython Numpy warning about NPY_NO_DEPRECATED_API when using MemoryView

后端 未结 3 1607
南笙
南笙 2020-12-16 09:07

I am converting a Cython memoryview to a numpy array (to be able to use it in pure Python code):

from libc.stdlib cimport realloc
cimport numpy as np

DTYPE          


        
3条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-16 10:05

    Assuming one wishes to hide the deprecation warning, the following compiler flag can be implemented with clang: extra_compile_args=['-Wno-#warnings'].

    For gcc, extra_compile_args=['-Wno-cpp'] achieves the same.

    Of course this also hides other preprocessor directive warnings.

提交回复
热议问题