~ubuntu-branches/ubuntu/trusty/python-numpy/trusty-updates

« back to all changes in this revision

Viewing changes to numpy/core/src/umath/reduction.c

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2013-01-28 19:03:02 UTC
  • mfrom: (7.1.13 experimental)
  • Revision ID: package-import@ubuntu.com-20130128190302-1kyak9j26902djjg
Tags: 1:1.7.0~rc1-1ubuntu1
Merge with Debian; remaining changes:

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
#include <numpy/arrayobject.h>
22
22
 
23
23
#include "npy_config.h"
24
 
#include "numpy/npy_3kcompat.h"
 
24
#include "npy_pycompat.h"
25
25
 
26
26
#include "lowlevel_strided_loops.h"
27
27
#include "reduction.h"
51
51
        Py_INCREF(dtype);
52
52
    }
53
53
 
54
 
    PyArray_CreateSortedStridePerm(PyArray_NDIM(arr), PyArray_SHAPE(arr),
 
54
    PyArray_CreateSortedStridePerm(PyArray_NDIM(arr),
55
55
                                    PyArray_STRIDES(arr), strideperm);
56
56
 
57
57
    /* Build the new strides and shape */
60
60
    for (idim = ndim-1; idim >= 0; --idim) {
61
61
        npy_intp i_perm = strideperm[idim].perm;
62
62
        if (axis_flags[i_perm]) {
63
 
            strides[i_perm] = 0;
 
63
            strides[i_perm] = stride;
64
64
            shape[i_perm] = 1;
65
65
        }
66
66
        else {