[Numpy-svn] [numpy/numpy] 79d22d: BLD: Add NPY_RELAXED_STRIDES_CHECKING flag
GitHub
noreply at github.com
Wed Apr 3 15:05:36 EDT 2013
Branch: refs/heads/master
Home: https://github.com/numpy/numpy
Commit: 79d22dcef7947347660cbb953cb54ee3b38822f5
https://github.com/numpy/numpy/commit/79d22dcef7947347660cbb953cb54ee3b38822f5
Author: Sebastian Berg <sebastian at sipsolutions.net>
Date: 2013-04-01 (Mon, 01 Apr 2013)
Changed paths:
M numpy/core/bscript
M numpy/core/setup.py
Log Message:
-----------
BLD: Add NPY_RELAXED_STRIDES_CHECKING flag
This flag will toggle to a new definition for the contiguous flags
where only the memory layout is forced to be correct. As a particular
example this means that np.ones((3,1)) can be both C and F-Contiguous
and its stride[-1] can be arbitrary but the array still contiguous.
The flag will also make most new arrays be created with MAX_INTP as
stride so that unsafe usage of the stride will surface more commonly.
Commit: 3a4ed02bca07d0995aedc8846b7aeac7af3bf310
https://github.com/numpy/numpy/commit/3a4ed02bca07d0995aedc8846b7aeac7af3bf310
Author: Sebastian Berg <sebastian at sipsolutions.net>
Date: 2013-04-01 (Mon, 01 Apr 2013)
Changed paths:
M numpy/core/src/multiarray/common.c
Log Message:
-----------
ENH: Relax aligned flag for shape[i] <= 1
In this case, either the dimensions stride will never be used to
access an element, so that it does not matter to the data alignment,
or the array has a size of 0 and is thus never unaligned.
Relaxed align flag is only active if NPY_RELAXED_STRIDES_CHECKING
was set during compile time.
Commit: 7af1c6701673187b7d895b7646204d774bffc557
https://github.com/numpy/numpy/commit/7af1c6701673187b7d895b7646204d774bffc557
Author: Sebastian Berg <sebastian at sipsolutions.net>
Date: 2013-04-01 (Mon, 01 Apr 2013)
Changed paths:
M numpy/core/include/numpy/ndarraytypes.h
M numpy/core/src/multiarray/ctors.c
M numpy/core/src/multiarray/flagsobject.c
M numpy/core/src/multiarray/multiarraymodule.c
M numpy/core/src/multiarray/shape.c
M numpy/core/tests/test_api.py
M numpy/core/tests/test_multiarray.py
M numpy/core/tests/test_regression.py
Log Message:
-----------
API: Implement new flags API with NPY_RELAXED_STRIDES_CHECKING
This largly reverts the changes to the flags setting api making the
newer preferable unsafe flags setting available through the
NPY_RELAXED_STRIDES_CHECKING eviroment variable. This variable is meant
for testing if code will stop working when the flags definition is changed.
The old definition is modified in some details to previously to enforce
safer strides (which was not the case before). This means that ndim==1
size==1 arrays are not necessarily considered contiguous. Also empty
arrays are not considered contiguous in some cases that were contiguous
before, and the rule that an array can only be both C and F-contiguous
if it is one (or zero) dimensional is relaxed, as it is incorrect for
size <= 1 arrays.
Commit: 507b09e523e11610ea7f9bf3350b2258120ab0d2
https://github.com/numpy/numpy/commit/507b09e523e11610ea7f9bf3350b2258120ab0d2
Author: Sebastian Berg <sebastian at sipsolutions.net>
Date: 2013-04-02 (Tue, 02 Apr 2013)
Changed paths:
M .travis.yml
M tools/test-installed-numpy.py
Log Message:
-----------
TST: Add NPY_RELAXED_STRIDES_CHECKING to Travis
Commit: 961a28f828fd7075af1e548a294c1443fdf4a215
https://github.com/numpy/numpy/commit/961a28f828fd7075af1e548a294c1443fdf4a215
Author: njsmith <njs at pobox.com>
Date: 2013-04-03 (Wed, 03 Apr 2013)
Changed paths:
M .travis.yml
M numpy/core/bscript
M numpy/core/include/numpy/ndarraytypes.h
M numpy/core/setup.py
M numpy/core/src/multiarray/common.c
M numpy/core/src/multiarray/ctors.c
M numpy/core/src/multiarray/flagsobject.c
M numpy/core/src/multiarray/multiarraymodule.c
M numpy/core/src/multiarray/shape.c
M numpy/core/tests/test_api.py
M numpy/core/tests/test_multiarray.py
M numpy/core/tests/test_regression.py
M tools/test-installed-numpy.py
Log Message:
-----------
Merge pull request #3162 from seberg/unsafe-strides
Revert changes to contiguous flags definition while creating NPY_TEST_UNSAFE_STRIDES
Compare: https://github.com/numpy/numpy/compare/a939f2aa83e7...961a28f828fd
More information about the Numpy-svn
mailing list