Branch: refs/heads/main
Revision: 7998ae0c2e78e43f140dc6032787129b89dd9a30
Author: jabraham17
Link: Python Array interoperability improvements by jabraham17 · Pull Request #26625 · chapel-lang/chapel · GitHub
Log Message:
Python Array interoperability improvements (#26625)
Improves the support for passing Arrays to Python without copying. The
module now supports native python indexing (i.e. using negative numbers)
and nested arrays. These nested arrays can be used with numpy.
This PR also exposed a eltType
enum and a ndim
field.
This PR also reordered some of the tests in the Python test directory
-
start_test test/library/packages/Python
-
start_test test/library/packages/Python
with GASNet -
start_test test/library/packages/Python --memleaks
[Reviewed by @lydia-duncan]
Diff:
M modules/packages/Python.chpl
M modules/packages/PythonHelper/ArrayTypes.c
M modules/packages/PythonHelper/ArrayTypes.h
A test/library/packages/Python/correctness/arrays/CLEANFILES
A test/library/packages/Python/correctness/arrays/COMPOPTS
A test/library/packages/Python/correctness/arrays/EXECENV
R091 test/library/packages/Python/correctness/myArray.chpl test/library/packages/Python/correctness/arrays/myArray.chpl
R070 test/library/packages/Python/correctness/myArray.good test/library/packages/Python/correctness/arrays/myArray.good
R100 test/library/packages/Python/correctness/myArrayReturnArray.chpl test/library/packages/Python/correctness/arrays/myArrayReturnArray.chpl
R100 test/library/packages/Python/correctness/myArrayReturnArray.good test/library/packages/Python/correctness/arrays/myArrayReturnArray.good
R100 test/library/packages/Python/correctness/myArrayReturnArray.prediff test/library/packages/Python/correctness/arrays/myArrayReturnArray.prediff
R093 test/library/packages/Python/correctness/myList.chpl test/library/packages/Python/correctness/arrays/myList.chpl
R094 test/library/packages/Python/correctness/myList.good test/library/packages/Python/correctness/arrays/myList.good
A test/library/packages/Python/correctness/arrays/nestedArrays.chpl
A test/library/packages/Python/correctness/arrays/nestedArrays.good
A test/library/packages/Python/correctness/arrays/nestedArrays.py
A test/library/packages/Python/correctness/arrays/numpyInterop.chpl
A test/library/packages/Python/correctness/arrays/numpyInterop.good
R053 test/library/packages/Python/correctness/fromCloudPickle.skipif test/library/packages/Python/correctness/arrays/numpyInterop.skipif
A test/library/packages/Python/correctness/arrays/python_libs.notest
A test/library/packages/Python/correctness/loadingCode/CLEANFILES
A test/library/packages/Python/correctness/loadingCode/COMPOPTS
A test/library/packages/Python/correctness/loadingCode/EXECENV
R100 test/library/packages/Python/correctness/fromCloudPickle.chpl test/library/packages/Python/correctness/loadingCode/fromCloudPickle.chpl
R100 test/library/packages/Python/correctness/fromCloudPickle.good test/library/packages/Python/correctness/loadingCode/fromCloudPickle.good
R100 test/library/packages/Python/correctness/fromCloudPickle.preexec test/library/packages/Python/correctness/loadingCode/fromCloudPickle.preexec
R100 test/library/packages/Python/correctness/fromCloudPickle.py test/library/packages/Python/correctness/loadingCode/fromCloudPickle.py
A test/library/packages/Python/correctness/loadingCode/fromCloudPickle.skipif
R100 test/library/packages/Python/correctness/fromPickle.chpl test/library/packages/Python/correctness/loadingCode/fromPickle.chpl
R100 test/library/packages/Python/correctness/fromPickle.good test/library/packages/Python/correctness/loadingCode/fromPickle.good
R100 test/library/packages/Python/correctness/fromPickle.preexec test/library/packages/Python/correctness/loadingCode/fromPickle.preexec
R100 test/library/packages/Python/correctness/fromPickle.py test/library/packages/Python/correctness/loadingCode/fromPickle.py
R100 test/library/packages/Python/correctness/moduleFromBytes.chpl test/library/packages/Python/correctness/loadingCode/moduleFromBytes.chpl
R100 test/library/packages/Python/correctness/moduleFromBytes.execopts test/library/packages/Python/correctness/loadingCode/moduleFromBytes.execopts
R100 test/library/packages/Python/correctness/moduleFromBytes.good test/library/packages/Python/correctness/loadingCode/moduleFromBytes.good
R100 test/library/packages/Python/correctness/moduleFromBytes.py test/library/packages/Python/correctness/loadingCode/moduleFromBytes.py
R100 test/library/packages/Python/correctness/moduleFromString.chpl test/library/packages/Python/correctness/loadingCode/moduleFromString.chpl
R100 test/library/packages/Python/correctness/moduleFromString.good test/library/packages/Python/correctness/loadingCode/moduleFromString.good
R100 test/library/packages/Python/correctness/moduleFromString.py test/library/packages/Python/correctness/loadingCode/moduleFromString.py
A test/library/packages/Python/correctness/loadingCode/python_libs.notest
A test/library/packages/Python/correctness/python_libs.notest
https://github.com/chapel-lang/chapel/pull/26625.diff