Bug#918090: theano: C-optimized ops fail with "module 'numpy.core.multiarray' has no attribute '_get_ndarray_c_version'"

Emilio Pozuelo Monfort pochu at debian.org
Wed Jan 9 11:42:08 GMT 2019


Hi Rebecca,

On Thu, 3 Jan 2019 07:26:32 +0000 "Rebecca N. Palmer" <rebecca_palmer at zoho.com>
wrote:
> Source: theano
> Version: 1.0.2+dfsg-1
> Severity: serious
> Control: tags -1 patch
> 
> Many Theano operations include C code for speed; the compilation process 
> uses an undocumented Numpy function to check ABI compatibility.
> 
> In Numpy 1.16 (recently added to sid), this function is moved, causing 
> all compiles to fail: 
> https://ci.debian.net/data/packages/unstable/amd64/t/theano/latest-autopkgtest/log.gz
> 
> Fix:
> 
> --- a/theano/theano/gof/cc.py
> +++ b/theano/theano/gof/cc.py
> @@ -1375,12 +1375,8 @@
> 
>           # We must always add the numpy ABI version here as
>           # DynamicModule always add the include <numpy/arrayobject.h>
> -        if np.lib.NumpyVersion(np.__version__)<'1.16.0a':
> -            ndarray_c_version = np.core.multiarray._get_ndarray_c_version()
> -        else:
> -            ndarray_c_version = 
> np.core._multiarray_umath._get_ndarray_c_version()
>           sig.append('NPY_ABI_VERSION=0x%X' %
> -                   ndarray_c_version)
> +                   np.core.multiarray._get_ndarray_c_version())
>           if c_compiler:
>               sig.append('c_compiler_str=' + c_compiler.version_str())
> 

I see you co-maintain theano. Can you upload this fix to help with the numpy
transition?

Thanks,
Emilio



More information about the debian-science-maintainers mailing list