[Numpy-svn] [numpy/numpy] b46f58: ENH: Do not rely on clean strides for loops.

GitHub noreply at github.com
Thu Oct 25 18:16:14 EDT 2012


  Branch: refs/heads/master
  Home:   https://github.com/numpy/numpy
  Commit: b46f589439201afabbcc9be586617e395ccc6c19
      https://github.com/numpy/numpy/commit/b46f589439201afabbcc9be586617e395ccc6c19
  Author: Sebastian Berg <sebastian at sipsolutions.net>
  Date:   2012-10-21 (Sun, 21 Oct 2012)

  Changed paths:
    M numpy/core/src/private/lowlevel_strided_loops.h

  Log Message:
  -----------
  ENH: Do not rely on clean strides for loops.

In lowlevel_strided_loops.h, do not rely that the strides for
contiguous arrays are set nicely since they can be considered not
important if an axis dimensions is zero.


  Commit: fb64bbf12f2405b3dc97f7736ae3dc35daf615dc
      https://github.com/numpy/numpy/commit/fb64bbf12f2405b3dc97f7736ae3dc35daf615dc
  Author: Sebastian Berg <sebastian at sipsolutions.net>
  Date:   2012-10-21 (Sun, 21 Oct 2012)

  Changed paths:
    M numpy/tests/test_ctypeslib.py

  Log Message:
  -----------
  TST: Update ctypes tests for changed contiguous flags setting.

This is unrelated to what is actually tested here.


  Commit: 4b281479db093a55c010610ad287c75beb6da13b
      https://github.com/numpy/numpy/commit/4b281479db093a55c010610ad287c75beb6da13b
  Author: Sebastian Berg <sebastian at sipsolutions.net>
  Date:   2012-10-21 (Sun, 21 Oct 2012)

  Changed paths:
    M numpy/core/include/numpy/ndarraytypes.h
    M numpy/core/numeric.py

  Log Message:
  -----------
  API: Change isfortran to f-contig and not c-contig

This was a check for 1-d arrays, this is the generalization to
higher dimension if we allow higher dimensioal arrays to be both
f- and c-contiguous.


  Commit: 0e10f55839ee0c2dc361f0a74990cbe8d83a66fd
      https://github.com/numpy/numpy/commit/0e10f55839ee0c2dc361f0a74990cbe8d83a66fd
  Author: Sebastian Berg <sebastian at sipsolutions.net>
  Date:   2012-10-21 (Sun, 21 Oct 2012)

  Changed paths:
    M numpy/core/src/multiarray/convert.c
    M numpy/core/src/multiarray/multiarraymodule.c
    M numpy/core/src/multiarray/shape.c

  Log Message:
  -----------
  BUG: Replace ISFORTRAN by IS_F_CONTIGUOUS.

In a few places ISFORTRAN was used to check for f-contiguouity.
This is incorrect, since ISFORTRAN never evaluated to True if
the array was also c-contiguous.


  Commit: 44f83e29b4f43648ee943d9e4d170a181cae9a6b
      https://github.com/numpy/numpy/commit/44f83e29b4f43648ee943d9e4d170a181cae9a6b
  Author: Sebastian Berg <sebastian at sipsolutions.net>
  Date:   2012-10-21 (Sun, 21 Oct 2012)

  Changed paths:
    M numpy/core/tests/test_regression.py

  Log Message:
  -----------
  TST: Test order='F' combined with C/F-contiguous arrays.

Both ravel and asarray misbehaved on 1D (or more generally
C and F-contiguous arrays if order='F' was specified. Speed
test for .tostring seems not feasably.


  Commit: c48156dfdc408f0a1e59ef54ac490cccbd6b8d73
      https://github.com/numpy/numpy/commit/c48156dfdc408f0a1e59ef54ac490cccbd6b8d73
  Author: Sebastian Berg <sebastian at sipsolutions.net>
  Date:   2012-10-21 (Sun, 21 Oct 2012)

  Changed paths:
    M numpy/core/src/multiarray/flagsobject.c

  Log Message:
  -----------
  API: Change Flags Updateing to allow C-/F-contiguous arrays

This changes UpdateFlags to ignore 1-dimensional axis when
setting C-/F-contiguous flags. Updates both flags always now.


  Commit: 8daf1443eae7e35bc8b6349e5304bd9bf2142ae7
      https://github.com/numpy/numpy/commit/8daf1443eae7e35bc8b6349e5304bd9bf2142ae7
  Author: Sebastian Berg <sebastian at sipsolutions.net>
  Date:   2012-10-21 (Sun, 21 Oct 2012)

  Changed paths:
    M numpy/core/src/multiarray/ctors.c

  Log Message:
  -----------
  API: ctors changed so that contiguous flags ignore 1-dim axis

This changes ctors.c so that new arrays are created in such a way
that they are both C- and F-contiguous if possible. Also fixes
some corner cases for 0-sized arrays.


  Commit: a0891abcd7deea0af6f1e7b91e59d1da2101bdff
      https://github.com/numpy/numpy/commit/a0891abcd7deea0af6f1e7b91e59d1da2101bdff
  Author: Sebastian Berg <sebastian at sipsolutions.net>
  Date:   2012-10-21 (Sun, 21 Oct 2012)

  Changed paths:
    M numpy/core/src/multiarray/multiarraymodule.c
    M numpy/core/src/multiarray/shape.c

  Log Message:
  -----------
  MNT: Remove unnecessary stride/flags cleanup.

This code is unnecessary with changed flags behavior. It would
only serve the purpose of making strides look nicer for the
user.
The UpdateFlags was only required since 1-dim axis being removed
might change contiguous flags. But this cannot happen now.


  Commit: dc4e38bb792825d7da23500c01b1cbd9dc4595b5
      https://github.com/numpy/numpy/commit/dc4e38bb792825d7da23500c01b1cbd9dc4595b5
  Author: Sebastian Berg <sebastian at sipsolutions.net>
  Date:   2012-10-21 (Sun, 21 Oct 2012)

  Changed paths:
    M numpy/core/src/multiarray/ctors.c
    M numpy/core/src/multiarray/dtype_transfer.c
    M numpy/core/src/multiarray/shape.c
    M numpy/core/src/umath/reduction.c
    M numpy/core/tests/test_api.py

  Log Message:
  -----------
  BUG: Fix bug with size 1-dims in CreateSortedStridePerm

This reverts changes done to CreateSortedStridePerm in commit
9194b3af. The problem is that it would fail for 3x1x3 Fortran order
array for example. And special handleing seems unnecessary at least
after 1-dim axis not mattering for contiguous flags.
This "closes Issue #434"


  Commit: dbe4468825bd1626cd3e90edcbf69a72df3d5180
      https://github.com/numpy/numpy/commit/dbe4468825bd1626cd3e90edcbf69a72df3d5180
  Author: Sebastian Berg <sebastian at sipsolutions.net>
  Date:   2012-10-22 (Mon, 22 Oct 2012)

  Changed paths:
    M numpy/core/tests/test_api.py

  Log Message:
  -----------
  TST: Check if contiguous flags are correct in various situations


  Commit: 4d741d282641ae7bd152ec6d89de8f24e9983267
      https://github.com/numpy/numpy/commit/4d741d282641ae7bd152ec6d89de8f24e9983267
  Author: Sebastian Berg <sebastian at sipsolutions.net>
  Date:   2012-10-22 (Mon, 22 Oct 2012)

  Changed paths:
    M numpy/core/include/numpy/ndarraytypes.h
    M numpy/core/src/multiarray/flagsobject.c
    M numpy/core/src/private/lowlevel_strided_loops.h

  Log Message:
  -----------
  MNT: Minor cleanups in comments and lowlevel_strided_loops.


  Commit: 02ebf8b3e7674a6b8a06636feaa6c761fcdf4e2d
      https://github.com/numpy/numpy/commit/02ebf8b3e7674a6b8a06636feaa6c761fcdf4e2d
  Author: Sebastian Berg <sebastian at sipsolutions.net>
  Date:   2012-10-23 (Tue, 23 Oct 2012)

  Changed paths:
    M numpy/core/src/multiarray/flagsobject.c

  Log Message:
  -----------
  MNT: Remove unnecessary special cases in _UpdateContiguousFlags

Remove unnecessary special cases for 0 and 1-d arrays as suggested
by njsmith.


  Commit: a890a8584319c2978735eef96ecaefefacad6346
      https://github.com/numpy/numpy/commit/a890a8584319c2978735eef96ecaefefacad6346
  Author: njsmith <njs at pobox.com>
  Date:   2012-10-25 (Thu, 25 Oct 2012)

  Changed paths:
    M numpy/core/include/numpy/ndarraytypes.h
    M numpy/core/numeric.py
    M numpy/core/src/multiarray/convert.c
    M numpy/core/src/multiarray/ctors.c
    M numpy/core/src/multiarray/dtype_transfer.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/src/private/lowlevel_strided_loops.h
    M numpy/core/src/umath/reduction.c
    M numpy/core/tests/test_api.py
    M numpy/core/tests/test_regression.py
    M numpy/tests/test_ctypeslib.py

  Log Message:
  -----------
  Merge pull request #2694 from seberg/cflags2

ENH: Make 1-dimensional axes not matter for contiguous flags


Compare: https://github.com/numpy/numpy/compare/c5ccca92c5f1...a890a8584319


More information about the Numpy-svn mailing list