summaryrefslogtreecommitdiff
path: root/numpy/f2py/tests/src
Commit message (Collapse)AuthorAgeFilesLines
* TST: Add a test for gh-23533Rohit Goswami2023-05-121-0/+5
|
* Merge branch 'main' into f2pyFuncFix_23598Sebastian Berg2023-04-261-0/+2
|\
| * BUG: Fix bug in parsing F77 style string arrays.Bob Eldering2023-03-271-0/+2
| | | | | | | | | | | | | | Example problematic variable: CHARACTER WORDARR(3)*8 This would be wrapped by an array with shape (3, 8) and dtype |S1, instead of the desired shape (3,) and dtype |S8. See #23356.
* | TST: Add a test for the f2py function wrapper fileRohit Goswami2023-04-171-0/+11
| |
* | TST: Add a test for gh-23598Rohit Goswami2023-04-161-0/+4
|/
* BUG: fix for f2py string scalars (#23194)Alexander Heger2023-02-111-0/+7
| | | | | | | | | | | | | | in previous version, any string scalar was converted to a string array of dimension len, i.e., a definition character(len=N) :: X effectively became character(len=NNN), dimension(NNN) :: X from the point of few of the numpy (python) interface: X.shape == (NNN,) X.dtype == '|SNNN' Closes gh-23192
* BUG: Use whole file for encoding checks with `charset_normalizer` [f2py] ↵Rohit Goswami2022-12-251-0/+4
| | | | | | | | | | | | | | | | | | | | | (#22872) * BUG: Use whole file for encoding checks [f2py] * DOC: Add a code comment Co-authored-by: melissawm <melissawm@gmail.com> * TST: Add a conditional unicode f2py test * MAINT: Add chardet as a test requirement * ENH: Cleanup and switch f2py to charset_normalizer * MAINT: Remove chardet for charset_normalizer * TST: Simplify UTF-8 encoding [f2py] Co-authored-by: melissawm <melissawm@gmail.com>
* TST: Ensure the f2py value attribute is handledRohit Goswami2022-06-211-0/+9
|
* TST: Ensure long_long in f2cmap worksRohit Goswami2022-06-102-0/+10
|
* Merge pull request #19388 from pearu/enh-f2py-character-supportMelissa Weber Mendonça2022-06-061-3/+4
|\ | | | | Co-authored-by: Rohit Goswami <rog32@hi.is>
| * ENH: Support character string arraysPearu Peterson2022-06-051-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TST: added test for issue #18684 ENH: f2py opens files with correct encoding, fixes #635 TST: added test for issue #6308 TST: added test for issue #4519 TST: added test for issue #3425 ENH: Implement user-defined hooks support for post-processing f2py data structure. Implement character BC hook. ENH: Add support for detecting utf-16 and utf-32 encodings.
* | ENH: complete the 'vars' list of a moduleDamien Caliste2022-06-051-0/+10
|/ | | | | | Add to the 'vars' list of a module missing subroutines or functions listed in the 'body' that have not been explicitely declared 'public' or 'private'.
* TST: Initialize f2py2e tests of the F2PY CLI (#20668)Rohit Goswami2022-04-012-0/+6
| | | | | Increases F2PY coverage by around 15 percent. For the CLI itself it covers the major features (around 70 percent), with the exception of mostly numpy.distutils stuff. More importantly, sets the groundwork for #20056, in that passing the same testsuite should indicate feature parity.
* BUG,ENH: Fix negative bounds for F2PY (#21256)Rohit Goswami2022-03-311-0/+7
| | | Co-authored-by: Pearu Peterson <pearu.peterson@gmail.com>
* Merge pull request #15844 from dcaliste/typeMelissa Weber Mendonça2022-01-171-0/+13
|\
| * ENH: add inline definition of access rights for Fortran typesDamien Caliste2022-01-041-0/+13
| | | | | | | | | | | | Allow to parse type definition with inline acess specifier, like: type, public :: foo end type foo
* | ENH: add support for operator() in crackfortran.Damien Caliste2022-01-041-0/+49
|/ | | | | | | | | | | | | | Some interface name may contains parenthesis when used with operator, like: interface operator(==) module procedure my_type_equals end interface operator(==) Make the end part properly detected, and store also the operator ('==' in that case) in the name. Also implement support to list the implemented by in any interface declaration.
* DEP: remove NPY_ARRAY_UPDATEIFCOPY, deprecated in 1.14 (#20589)Matti Picus2021-12-181-1/+0
| | | | | | | | | | | | | * DEP: remove NPY_ARRAY_UPDATEIFCOPY, deprecated in 1.14 * remove more UPDATEIFCOPY * typo: add missing comma * remove a few more UPDATEIFCOPY * Add release note * remove UPDATEIFCOPY from comment (from review)
* MAINT,TST: Refactor F2PY testsRohit Goswami2021-12-0625-0/+769
|
* MAIN: Minor include rationalization.Charles Harris2021-09-031-1/+3
| | | | | | | - Replace "Python.h" by <Python.h> - Replace "structmember.h" by <structmember.h> - Replace <npy_config> by "npy_config" - Define PY_SSIZE_T_CLEAN before all Python.h includes in .c files.
* BUG: revise string_from_pyobj/try_pyarr_from_string with respect to malloc ↵Pearu Peterson2021-06-151-1/+1
| | | | and copy (the second round)
* Revert "BUG: revise string_from_pyobj/try_pyarr_from_string with respect to ↵Ralf Gommers2021-06-131-1/+1
| | | | malloc and copy." (#19235)
* MAINT: apply sizeof(char)==1Pearu Peterson2021-05-261-1/+1
|
* BUG: Fixes module data docstrings.MelissaWM2020-09-242-0/+12
| | | | Fixes gh-15325
* Merge branch 'master' into cleanup-LongEric Wieser2020-08-241-13/+8
|\
| * MAINT: Remove uses of PyString_FromString.Charles Harris2020-08-191-13/+8
| | | | | | | | | | | | | | | | We no longer need to use the compatibility function after dropping support for Python 2.7. In some cases unicode was the correct string type rather than the bytes of the compatibility version and bugs in the array `__complex__` and array `__array_interface__` methods have been fixed by changing that.
* | MAINT: Replace PyInt macros with their PyLong replacementEric Wieser2020-08-241-4/+4
|/ | | | Unlike the others, PyInt_Check has a special meaning distinc from PyLong_Check, so only the places where the difference doesn't matter have been updated here.
* MNT: support python 3.10Thomas A Caswell2020-05-291-1/+1
| | | | | | | | | | | | In https://github.com/python/cpython/pull/20290 CPython changed `Py_TYPE` from a macro to an inline function. This requires a code change to us `Py_SET_TYPE` instead when using `Py_TYPE()` as a lvalue in c code. In https://github.com/python/cpython/pull/20429 CPython changed `Py_SIZE` from a macro to an inline function. This requires a code change to us `Py_SET_SIZE` instead of using `Py_SIZE` as a lvalue in c code.
* Cleaning up PY_MAJOR_VERSION/PY_VERSION_HEXSeth Troisi2020-01-031-2/+0
|
* MAINT: Remove Python2 specific C module setup (gh-15231)Seth Troisi2020-01-031-11/+1
| | | | | Dropping the support for python 2, the difference in module setup do not have to be accounted for anymore. This removes the macros and ifdef's related to module setup code and python 2 support.
* BUG: Further, followup f2py reference count fixesSebastian Berg2019-08-191-3/+16
| | | | | | | | Note that the extension module dict seems to be never dereferenced (there is an additional reference to it kept around somewhere). This reference seems to part of the C python module loading (possibly intentionally), and I could not find how to remove it or where it originates from.
* BUG: General fixes to f2py reference counts (dereferencing)Sebastian Berg2019-08-191-56/+64
|
* MAINT: Hard tab and whitespace cleanup.Charles Harris2018-03-081-13/+13
|
* DEP, ENH: deprecate UPDATEIFCOPY (except for nditer) and replace with ↵Matti Picus2017-11-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | WRITEBACKIFCOPY (#9639) * ENH: add API to resolve UPDATEONCOPY outside dealloc, test and use * BUG: Fix usage of keyword "from" as argument name for "can_cast". Also removed inconsistency between the second argument name between documentation ("totype") and code ("to"). * UPDATEIFCOPY -> WRITEBACKIFCOPY, documentation * fixes for review * review2, fix new test * fix new test for using self.assert_deprecated * change deprecation logic as per review * new logic exposed places where PyArray_ResolveWritebackIfCopy not called * deprecate PyArray_XDECREF_ERR in favor of PyArray_DiscardWritebackIfCopy * code review changes * clean up merge cruft * fix from review * fixes from review * extend the release note
* TST: add test case described in ticket 9228 for numpy.f2pyBob Eldering2017-06-131-0/+11
|
* TST: add a char array input testJulian Taylor2017-05-021-0/+29
|
* TST: adding test for constants without compound kind specjutke2017-01-201-0/+23
| | | | | | | This augments the test in constant_compound.f90 by using constants without a compound kind spec to illustrate the case that led to the reporting of issue #8493
* TST: adding tests for compound constant provided by @zerothijutke2017-01-201-0/+15
| | | | | This is a test code provided as a patch by @zerothi checking the compound constant parsing.
* BUG: fixed kind specifications for parametersNick Papior2016-11-273-0/+102
| | | | | | | | | | | | | Fortran sources with parameters having kind-specifiers where not correctly intercepted in the crackfortran.py source. The reason was a restrictive check for only integer specifiers which did not split real's into the correct number. Furthermore, several tests has been added which tests the different kind specifiers and their use in codes, also all of them together. Signed-off-by: Nick Papior <nickpapior@gmail.com>
* DEP: removed deprecated API calls from test code (wrapmodule.c)Chris Kerr2014-11-101-31/+31
|
* TST: Add basic test for compiling with intent(in out).Charles Harris2014-10-091-0/+9
| | | | | This checks that the compilation works and that the expected error is raised when non-contiguous arrays are passed as intent(in out).
* Use PyMODINIT_FUNC and update docs accordingly.cgohlke2012-09-021-1/+1
| | | | See https://github.com/scipy/scipy/pull/279
* STY: f2py - replace macros in old_defines.h with new.Charles Harris2012-02-041-26/+26
|
* BUG: Fix two argument size support for Fortran module routines. Reverted ↵Pearu Peterson2011-05-061-0/+30
| | | | size-to-shape mapping patch and implemented two argument size function in C.
* BUG: Fix assumed shape support for module routines.Pearu Peterson2011-05-061-0/+41
|
* BUG: Fix memory leak in f2py_rout_wrap_call test.Michael Droettboom2011-05-021-1/+3
|
* ENH: f2py: support Fortran size function with two arguments (ticket #1765).Pearu Peterson2011-03-131-0/+14
|
* Implemented selected_real_kind evaluation, added tests to catch processor ↵Pearu Peterson2011-02-271-0/+20
| | | | dependencies..
* Fix assumed shape support for routines that use modules. Improved ↵Pearu Peterson2011-02-273-0/+24
| | | | .f2py_f2cmap messages.
* WIP: implemented assumed shape support for Fortran subroutines.Pearu Peterson2011-02-261-3/+3
|