summaryrefslogtreecommitdiff
path: root/numpy/array_api/_elementwise_functions.py
diff options
context:
space:
mode:
authorMasamichi Hosoda <trueroad@trueroad.jp>2022-01-22 19:04:01 +0900
committerMasamichi Hosoda <trueroad@trueroad.jp>2022-01-22 19:04:01 +0900
commit37f3d19b5c196111f3a37ff81503cebf0199b638 (patch)
tree0d33c0f45f7744787c81e3d35553ee7df6659365 /numpy/array_api/_elementwise_functions.py
parent45b59a6c5d91fcb815bbdde77014d9731fd9dc15 (diff)
downloadnumpy-37f3d19b5c196111f3a37ff81503cebf0199b638.tar.gz
BUG: mtrand cannot be imported on Cygwin
There is an issue that mtrand in numpy-1.22.x cannot be imported because `PyInit_mtrand` is not exported on Cygwin. https://cygwin.com/pipermail/cygwin/2022-January/250481.html mtrand is generated from three sources, mtrand.c, src/legacy/legacy-distributions.c, and src/distributions/distributions.c. In numpy-1.21.x, there are no symbols with a `__declspec(dllexport)` attribute in the source files. On the other hand, in numpy-1.22.0, the commit b797a0cb97a8a9e7e36962dc8c37c075967aa88b adds the attribute to the symbols in src/distributions/distributions.c. `PyInit_mtrand` is contained in mtrand.c, so the attribute is not added. Cygwin's ld exports all symbols if there are no symbols with the `__declspec(dllexport)` attribute. Therefore, in numpy-1.21.x, `PyInit_mtrand` without the attribute is also exported. However, if there is even one symbol with the `__declspec(dllexport)` attribute, Cygwin's ld does not export symbols without the attribute. Therefore, in numpy-1.22.0, `PyInit_mtrand` without the attribute is not also exported. https://sourceware.org/binutils/docs/ld/WIN32.html This commit solves the issue by removing the unnecessary `__declspec(dllexport)` attribute.
Diffstat (limited to 'numpy/array_api/_elementwise_functions.py')
0 files changed, 0 insertions, 0 deletions