diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2015-11-01 18:05:57 -0700 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2015-11-01 18:05:57 -0700 |
commit | 141339ba01cc331f7d6903c8be6ef20d9904d34d (patch) | |
tree | 00e652b222a99c0af1bf263a9d15c3e87b76e529 | |
parent | 629d4081ad29db2f77a2b5f0fc00f434daacf7b1 (diff) | |
parent | 34051eb5427869a62bee6809a8d8c89ba52a7600 (diff) | |
download | numpy-141339ba01cc331f7d6903c8be6ef20d9904d34d.tar.gz |
Merge pull request #6596 from charris/fix-swig-for-relaxed-strides
Fix swig for relaxed stride checking
-rw-r--r-- | doc/release/1.10.2-notes.rst | 20 | ||||
-rw-r--r-- | numpy/core/numeric.py | 8 | ||||
-rw-r--r-- | tools/swig/numpy.i | 2 |
3 files changed, 26 insertions, 4 deletions
diff --git a/doc/release/1.10.2-notes.rst b/doc/release/1.10.2-notes.rst index 8a2a827d7..930e55ea7 100644 --- a/doc/release/1.10.2-notes.rst +++ b/doc/release/1.10.2-notes.rst @@ -6,9 +6,22 @@ adds various build and release improvements. Numpy 1.10.1 supports Python 2.6 - 2.7 and 3.2 - 3.5. + +Compatibility notes +=================== + +fix swig bug in ``numpy.i`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Relaxed stride checking revealed a bug in ``array_is_fortran(a)``, that was +using PyArray_ISFORTRAN to check for Fortran contiguity instead of +PyArray_IS_F_CONTIGUOUS. You may want to regenerate swigged files using the +updated numpy.i + + Issues Fixed ============ +* gh-6590 Fortran Array problem in numpy 1.10. * gh-6563 Intent(out) broken in recent versions of f2py. * gh-6530 The partition function errors out on empty input. * gh-6498 Mention change in default casting rule in 1.10 release notes. @@ -47,11 +60,16 @@ The following PRs in master have been backported to 1.10.2 * gh-6562 BUG: Disable view safety checks in recarray. * gh-6567 BUG: Revert some import * fixes in f2py. * gh-6577 BUG: Fix for #6569, allowing build_ext --inplace -* gh-6579 MAINT: Fix mistake in doc upload rule +* gh-6579 MAINT: Fix mistake in doc upload rule. +* gh-6596 BUG: Fix swig for relaxed stride checking. The following PR reverted initial work for mingwpy. * gh-6536 BUG: Revert gh-5614 to fix non-windows build problems + +And the this PR reverted a fix for np.lib.split that undid some behavior +that will be standard in 1.11. + * gh-6576 BUG: Revert gh-6376 to fix split behavior for empty arrays. Notes diff --git a/numpy/core/numeric.py b/numpy/core/numeric.py index 5c0e27239..4350e123f 100644 --- a/numpy/core/numeric.py +++ b/numpy/core/numeric.py @@ -696,8 +696,12 @@ def require(a, dtype=None, requirements=None): def isfortran(a): """ - Returns True if array is arranged in Fortran-order in memory - and not C-order. + Returns True if the array is Fortran contiguous but *not* C contiguous. + + This function is obsolete and, because of changes due to relaxed stride + checking, its return value for the same array may differ for versions + of Numpy >= 1.10 and previous versions. If you only want to check if an + array is Fortran contiguous use ``a.flags.f_contiguous`` instead. Parameters ---------- diff --git a/tools/swig/numpy.i b/tools/swig/numpy.i index 2ddc11de7..11fcd42fe 100644 --- a/tools/swig/numpy.i +++ b/tools/swig/numpy.i @@ -96,7 +96,7 @@ %#endif %#define array_is_contiguous(a) (PyArray_ISCONTIGUOUS((PyArrayObject*)a)) %#define array_is_native(a) (PyArray_ISNOTSWAPPED((PyArrayObject*)a)) -%#define array_is_fortran(a) (PyArray_ISFORTRAN((PyArrayObject*)a)) +%#define array_is_fortran(a) (PyArray_IS_F_CONTIGUOUS((PyArrayObject*)a)) } /**********************************************************************/ |