summaryrefslogtreecommitdiff
path: root/numpy/linalg/lapack_lite/make_lite.py
Commit message (Collapse)AuthorAgeFilesLines
* MAINT: remove redundant open() modes and io.open() aliasMike Taves2022-10-291-3/+3
|
* MAINT: LGTM.com recommendation: Except block handles 'BaseException'Dimitri Papadopoulos2021-10-071-4/+1
| | | | Except block directly handles BaseException.
* REV: 96727cfDimitri Papadopoulos2021-09-211-1/+4
| | | | | | | This is a Python 2 script, and will remain so for some time. Instead of simply reverting the commit, use try/except to find the proper way to import which.
* MAINT: force shebang to python2.7Dimitri Papadopoulos2021-09-211-1/+2
| | | | Make crystal clear that these remain Python 2 scripts.
* REV: 7949ba5Dimitri Papadopoulos2021-09-211-2/+2
| | | | This is a Python 2 script, revert Python 3 exception handling.
* REV: b62ffc5Dimitri Papadopoulos2021-09-211-2/+2
| | | | This is a Python 2 script, revert Python 3 exception handling.
* REV: aec0576Dimitri Papadopoulos2021-09-211-9/+10
| | | | This is a Python 2 script, fstrings are implemented in Python 3 only.
* REV: 583901aDimitri Papadopoulos2021-09-211-1/+1
| | | | | This is actually a Python 2 script, not a Python 3 script. Revert the shebang to its previous state.
* MAINT: raise from previous exception in make_lite.pyAndrew Watson2021-07-031-2/+2
| | | Co-authored-by: Bas van Beek <43369155+BvB93@users.noreply.github.com>
* MAINT: fix overly broad exception handling listed in LGTMAndrew Watson2021-07-011-1/+1
| | | | Relates to ticket #19077
* See #15986. Chain exceptions in linalgtautaus2021-01-311-2/+2
|
* BUG: Fix small bug in make_lite.py.Charles Harris2020-11-011-1/+1
| | | | Flagged by LGTM.
* Convert some strings to fstrignsJakob2020-10-241-9/+9
|
* convert shebang from python to python3 (#15687)Changqing Li2020-03-041-1/+1
| | | | Signed-off-by: Changqing Li <changqing.li@windriver.com>
* MAINT: Remove sys.version checks (gh-#15373)Seth Troisi2020-01-281-6/+1
| | | More sys.version cleanup.
* Merge pull request #15224 from pv/lapack-lite-symrenameMatti Picus2020-01-201-7/+59
|\ | | | | MAINT: linalg: use symbol suffix in fallback lapack_lite
| * MAINT: linalg: use symbol suffix in fallback lapack_litePauli Virtanen2020-01-141-7/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | When building the fallback lapack_lite library for numpy.linalg, add symbol suffix to the routines when using 64-bit integer indices. Adjust the lapack_lite generator script to also output a header file that renames the symbols. Moreover, also rename symbols from f2c.c, to be sure (because they have short and generic names that may clash). This avoids a name clash with BLAS/LAPACK names, which can cause problems in corner cases on platforms where inadvertent symbol overriding in dynamic libraries can occur.
* | MAINT: Remove implicit inheritance from object class (#15236)Jon Dufresne2020-01-051-2/+2
| | | | | | | | | | | | | | Inheriting from object was necessary for Python 2 compatibility to use new-style classes. In Python 3, this is unnecessary as there are no old-style classes. Dropping the object is more idiomatic Python.
* | MAINT: Remove unnecessary 'from __future__ import ...' statementsJon Dufresne2020-01-031-2/+0
|/ | | | | As numpy is Python 3 only, these import statements are now unnecessary and don't alter runtime behavior.
* BUG: Align type definition with generated lapack (#10477)xoviat2018-02-161-5/+39
| | | | | | | | | | | | | | | | | | | | | | * Align type definitions * Regenerate sources * Replace BytesIO * Consolidate executables * Create directories on PY2 * Revise step name * Consolidate directory creation * Don't catch makedirs errors * Revise step name * Add header source
* ENH: Add patch files to allow LAPACK 3.2.2 to be f2c'dEric Wieser2017-03-251-1/+7
| | | | This doesn't yet actually generate the files, since they would cause the diff to balloon
* MAINT: Prefer to load functions from lapack/install if possibleEric Wieser2017-03-021-2/+14
| | | | | | | | | | | | | | Previously, the dlamch function was a manually-edited file, precluding autogeneration. We fix this by putting the manual edits in a patch file, and then generating f2c_config.c from install/*.f, which includes dlamch. While these functions exist in more than once place in lapack 3.0.0, they only exist in lapack/install in newer versions. A side effect of this is that some functions have been pulled out of `f2c_blas.c` and `f2c_s_lapack.c` into this new file. The edits in the patch were introduced in cadbb5f2ec84cb774023bbe8cbe6f39a93e837d7, for a reason that is lost to time.
* MAINT: Split up the lapack_lite files more sensiblyEric Wieser2017-03-021-6/+12
| | | | | | | | | | | | | | | | | | Also uses this splitting as an excuse to ditch the _lite suffix, in favor of a f2c_ prefix for all generated files. Before: * `zlapack_lite.c` - Functions for the `complex128` type. * `dlapack_lite.c` - Every other lapack function After: * `f2c_z_lapack.c` - Functions for the `complex128` type. * `f2c_c_lapack.c` - Functions for the `complex64` type. * `f2c_d_lapack.c` - Functions for the `float64` type. * `f2c_s_lapack.c` - Functions for the `float32` type. * `f2c_lapack.c` - Every other lapack function
* MAINT: Improve handing of files and subprocessesEric Wieser2017-03-021-47/+59
| | | | | Since we can use 2.7+ features now, we can have the with statement and subprocess.check_call
* MAINT: Squelch parenthesis warnings from GCCEric Wieser2017-02-211-0/+9
| | | | | These were previously avoided by patching f2c, but this was more work for little gain, and the patch was not committed.
* BUG: Output a valid include path, rather than one inherited from NumericEric Wieser2016-12-291-1/+1
|
* STY: Giant comma spacing fixup.Charles Harris2013-08-181-1/+1
| | | | | | | Run the 2to3 ws_comma fixer on *.py files. Some lines are now too long and will need to be broken at some point. OTOH, some lines were already too long and need to be broken at some point. Now seems as good a time as any to do this with open PRs at a minimum.
* MAINT: Apply 2to3 idioms fixer.Charles Harris2013-05-021-3/+2
| | | | | | | | | | | | | | | | | | | The idioms fixer makes the following replacements. 1) int <- bool 2) comparison or identity of types <- isinstance 3) a.sort() <- sorted(a) There were two problems that needed to be dealt with after the application of the fixer. First, the replacement of comparison or identity of types by isinstance was not always correct. The isinstance function returns true for subtypes whereas many of the places where the fixer made a substitution needed to check for exact type equality. Second, the sorted function was applied to arrays, but because it treats them as iterators and constructs a sorted list from the result, that is the wrong thing to do. Closes #3062.
* 2to3: apply `dict` fixer.Charles Harris2013-04-061-2/+2
| | | | | | | | | | | | | | | In Python3 `dict.items()`, `dict.keys()`, and `dict.values()` are iterators. This causes problems when a list is needed so the 2to3 fixer explicitly constructs a list when is finds on of those functions. However, that is usually not necessary, so a lot of the work here has been cleaning up those places where the fix is not needed. The big exception to that is the `numpy/f2py/crackfortran.py` file. The code there makes extensive use of loops that modify the contents of the dictionary being looped through, which raises an error. That together with the obscurity of the code in that file made it safest to let the `dict` fixer do its worst. Closes #3050.
* 2to3: Apply `print` fixer.Charles Harris2013-04-061-7/+7
| | | | | | | Add `print_function` to all `from __future__ import ...` statements and use the python3 print function syntax everywhere. Closes #3078.
* 2to3: Use absolute imports.Charles Harris2013-03-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new import `absolute_import` is added the `from __future__ import` statement and The 2to3 `import` fixer is run to make the imports compatible. There are several things that need to be dealt with to make this work. 1) Files meant to be run as scripts run in a different environment than files imported as part of a package, and so changes to those files need to be skipped. The affected script files are: * all setup.py files * numpy/core/code_generators/generate_umath.py * numpy/core/code_generators/generate_numpy_api.py * numpy/core/code_generators/generate_ufunc_api.py 2) Some imported modules are not available as they are created during the build process and consequently 2to3 is unable to handle them correctly. Files that import those modules need a bit of extra work. The affected files are: * core/__init__.py, * core/numeric.py, * core/_internal.py, * core/arrayprint.py, * core/fromnumeric.py, * numpy/__init__.py, * lib/npyio.py, * lib/function_base.py, * fft/fftpack.py, * random/__init__.py Closes #3172
* 2to3: Put `from __future__ import division in every python file.Charles Harris2013-03-011-0/+1
| | | | | | | | This should be harmless, as we already are division clean. However, placement of this import takes some care. In the future a script can be used to append new features without worry, at least until such time as it exceeds a single line. Having that ability will make it easier to deal with absolute imports and printing updates.
* STY: Replace remaining old style classes with classes subclassing object.Charles Harris2011-04-051-2/+2
|
* Python 3000 fixes for 2to3 [patch by James Watson].Stefan van der Walt2009-03-021-1/+1
|
* Using the in operator to find substrings. It is shorter and easier to ↵Jarrod Millman2007-10-291-1/+1
| | | | understand.
* Add the code that generates lapack_lite from LAPACK sources.cookedm2006-06-271-0/+264
This is from Numeric. I think we're still using the same generated sources.