summaryrefslogtreecommitdiff
path: root/tools/swig
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #16604 from Iamsoto/bugfix_16492_segfault_on_pyfragmentsSebastian Berg2023-02-221-0/+2
|\ | | | | BUG: SWIG overloaded long functions on pyfragments.swg will seg fault
| * Merge branch 'main' into bugfix_16492_segfault_on_pyfragmentsCharles Harris2022-06-094-194/+41
| |\
| * | BUG: default/overloadedfunctions with long will seg faultiamsoto2020-06-141-0/+2
| | |
* | | MAINT: Readable macro for the SWIG version checksRohit Goswami2022-10-101-17/+17
| | |
* | | MAINT: Remove PyCObject from the SWIG interfaceRohit Goswami2022-10-101-73/+15
| |/ |/|
* | MAINT: Further small return value validation fixesSebastian Berg2022-02-031-2/+2
| |
* | MAINT, DOC: discard repeated wordsDimitri Papadopoulos2022-01-132-2/+2
| |
* | MAINT: Replace deprecated unittest aliasesHugo van Kemenade2021-08-181-11/+11
| |
* | removed extraneous ARGOUTVIEWM dim. 4 typemapsPatrick T. Komiske III2021-03-011-152/+0
| | | | | | https://github.com/numpy/numpy/issues/18521
* | MAINT: Cleanup swig for Python 3.Charles Harris2020-10-182-12/+11
| | | | | | | | Replaces ``PyInt_Check`` and ``PyInt_AsLong`` in a few places.
* | BLD: Fixed ARGOUTVIEWM memory deallocation.leakec2020-09-291-18/+18
| | | | | | | | Closes #17398
* | MAINT: Replace PyString_Check with PyBytes_Check in numpy.i.Charles Harris2020-09-101-1/+1
|/ | | | | | Replace the npy_3kcompat PyString_Check with its definition. This is done separately for the tools/swig/numpy.i file as it might be problematic.
* Fix swig testsMathieu Lamarre2020-03-134-53/+59
| | | | | resize typemap issue python 3 bytes vs str issue
* convert shebang from python to python3 (#15687)Changqing Li2020-03-049-9/+9
| | | | Signed-off-by: Changqing Li <changqing.li@windriver.com>
* MAINT: cleanup unused imports; avoid redefinition of importsMike Taves2020-02-068-16/+0
| | | | | | | * Cleanup unused imports (F401) of mostly standard Python modules, or some internal but unlikely referenced modules * Where internal imports are potentially used, mark with noqa * Avoid redefinition of imports (F811)
* MAINT: resolve pyflake F403 'from module import *' usedMike Taves2020-01-231-1/+1
| | | | | | * For external modules, resolve imported members * Most internal relative modules were ignored or marked noqa: F403 * Convert a few internal absolute imports to relative imports
* Merge pull request #15232 from sethtroisi/remove_python3_part3Matti Picus2020-01-042-21/+1
|\ | | | | MAINT: Cleaning up PY_MAJOR_VERSION/PY_VERSION_HEX
| * Cleaning up PY_MAJOR_VERSION/PY_VERSION_HEXSeth Troisi2020-01-032-21/+1
| |
* | MAINT: Remove unnecessary 'from __future__ import ...' statementsJon Dufresne2020-01-039-18/+0
|/ | | | | As numpy is Python 3 only, these import statements are now unnecessary and don't alter runtime behavior.
* Use *sys.version_info[:2]Hugo2019-08-261-1/+1
|
* BUG: Fix for Python 3.10Hugo2019-08-261-1/+1
|
* Fix deprecated ``assertEquals()``Nicola Soranzo2019-04-236-30/+30
| | | | See https://docs.python.org/2/library/unittest.html#deprecated-aliases
* BUG: Fix memory leak in pyfragments.swg (#11877)Christopher Pezley2018-09-101-2/+4
| | | | | | | | | | | * BUG: Fix memory leak in pyfragments.swg Make sure to Py_DECREF the Py_ArrayDesc created in the definition of SWIG_CanCastAsInteger for long and unsigned long. Fixes #11876 * fixup! BUG: Fix memory leak in pyfragments.swg
* MAINT: Misc small fixes. (#10722)Charles Harris2018-03-101-31/+31
| | | | | | | | | | * MAINT: Replace print statements for Python3. Updates tools/swig/test/testSuperTensor.py. * MAINT: Fix deprecated escaped characters for python 3.6+. Update numpy/linalg/lapack_lite/clapack_scrub.py.
* White spacesMathieu Lamarre2018-02-081-1/+1
|
* Swig tool: Clear CARRAY flag when buffer is not C_CONTIGUOUSMathieu Lamarre2018-02-081-2/+8
| | | | Leave the flag if there's only one non unit dim
* Swig tool: Clear CARRAY flag when setting FARRAYMathieu Lamarre2018-02-081-0/+2
| | | | | | | Otherwise the returned array has both flags, which creates all sorts of confusing runtime behaviors. C_CONTIGUOUS : True F_CONTIGUOUS : True Doesn't cause a crash, but some functions like copy() works in F_CONTIGUOUS others like element wise operators assume C_CONTIGUOUS, obviously this becomes a nightmare to debug.
* Added types for int and uint with an explicit size.Mark Harfouche2018-01-121-1/+10
|
* Avoid NPY_ARRAY_F_CONTIGUOUS for numpy < 1.7Jan David Mol2016-06-181-1/+6
| | | numpy API < 1.7 does not support NPY_ARRAY_F_CONTIGUOUS.or PyArray_IS_F_CONTIGUOUS. Supporting old APIs is useful as users tend to ship modern numpy.i files to compile against possibly older numpy installations.
* Fix a false positive OverflowError in Python 3.x when value above 0x7FFFFFF ↵Mathieu Lamarre2016-04-221-7/+14
| | | | | | | | | | | | are passed to a function accepting "unsigned int". This a port of a fix in pyprimtype.swg from which several code snippets where copy pasted into swig/pyfragments.swg. Please see SWIG changes log (2015-12-23) for more details: http://www.swig.org/Release/CHANGES.current 2015-12-23: ahnolds [Python] Fixes for conversion of signed and unsigned integer types ...
* MAINT: Remove commented out code blocksgfyoung2015-12-201-10/+0
|
* DOC: Use print only as function when print_function is imported from __future__gfyoung2015-12-191-1/+1
| | | | Closes gh-6863.
* BUG: Fix swig make_fortran function.Charles Harris2015-11-041-1/+1
| | | | | | | | The function was calling PyArray_FromArray with NPY_FORTRANORDER instead of NPY_ARRAY_F_CONTIGUOUS. The first is of type NPY_ORDER and the second is a flag. Closes #6618. [ci skip]
* BUG: Fix use of PyArray_ISFORTRAN in numpy.i.Charles Harris2015-11-011-1/+1
| | | | | | | | | | PyArray_ISFORTRAN was used to implement array_is_fortran in numpy.i when what was wanted was PyArray_IS_F_CONTIGUOUS. The difference is that PyArray_ISFORTRAN will return False if the array is c_contiguous. Previous to relaxed stride checking this did not matter, but currently arrays with ndim > 1 may be both C and Fortran contiguous and that results in errors when PyArray_ISFORTRAN is mistakenly used to check for Fortran contiguity.
* typo in numpy.ijschueller2015-09-021-1/+1
|
* New typemap for in-place arrays of arbitrary number of dimensions:Tom Krauss2015-05-258-26/+394
| | | | | (DATA_TYPE* INPLACE_ARRAY_FLAT, DIM_TYPE DIM_FLAT) Added unittests, updated documentation.
* DOC: put a copy of the text in LICENSE.txt into tools/swig/numpy.iRalf Gommers2015-03-181-0/+34
| | | | | | | | | Reason: numpy.i is supposed to be copied, not used from within an installed Numpy version. Closes gh-5690 [ci skip]
* Correct exit code if number of errors % 256 == 0Chris Lamb2015-02-157-7/+7
| | | | | | | For example, we had 256 errors (etc.) our process will exit with a successful error code which is incorrect and/or misleading. Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
* Use correct #ifdef __cplusplus guard to include std_complex.iMichele Vallisneri2015-02-131-2/+2
|
* ENH: added std::complex support to numpy.iGlen Mabey2014-11-077-12/+333
| | | | | | numpy.i now includes ready-made typemaps for std::complex<float> and std::complex<double> . Tests were added to testArray using a newly defined ArrayZ class.
* Fix typemap for Fortran ordered array inputAdam Reeve2014-06-161-3/+3
| | | | | | The typemaps with size parameters after the array pointer were correct, but the typemaps with size parameters before the array pointer created arrays with C ordering.
* BUG: Fix missing fragment in ARGOUTVIEWM typemaps.David Froger2014-05-261-18/+18
| | | | | | | | | | The argout typemaps of all the ARGOUTVIEWM typemap suites make use of the free_cap function, defined in the NumPy_Utilities fragment, which was not listed in the fragment argument of the typemaps. As a result, the free_cap function is not included in the source generated code by SWIG, and the code do not compile (unless another typemap including the missing fragment has been used).
* STY: Whitespace patrol on numpy.i.Charles Harris2014-03-121-6/+6
|
* MAINT: Move doc/swig to tools/swig.Charles Harris2014-03-1236-0/+7361
Also update MANIFEST.in and documentation to reflect the move. The discussion of this change is at #2384. Closes #2384. Closes #4374.