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

« back to all changes in this revision

Viewing changes to numpy/core/src/multiarray/mapping.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:
60
60
    if (check_and_adjust_index(&i, dim0, 0) < 0) {
61
61
        return NULL;
62
62
    }
63
 
    item = PyArray_DATA(self) + i * PyArray_STRIDE(self, 0);
 
63
    item = PyArray_BYTES(self) + i * PyArray_STRIDE(self, 0);
64
64
 
65
65
    /* Create the view array */
66
66
    Py_INCREF(PyArray_DESCR(self));
108
108
        if (check_and_adjust_index(&i, dim0, 0) < 0) {
109
109
            return NULL;
110
110
        }
111
 
        item = PyArray_DATA(self) + i * PyArray_STRIDE(self, 0);
 
111
        item = PyArray_BYTES(self) + i * PyArray_STRIDE(self, 0);
112
112
 
113
113
        return PyArray_Scalar(item, PyArray_DESCR(self), (PyObject *)self);
114
114
    }
159
159
    if (check_and_adjust_index(&i, dim0, 0) < 0) {
160
160
        return -1;
161
161
    }
162
 
    item = PyArray_DATA(self) + i * PyArray_STRIDE(self, 0);
 
162
    item = PyArray_BYTES(self) + i * PyArray_STRIDE(self, 0);
163
163
 
164
164
    return PyArray_DESCR(self)->f->setitem(v, item, self);
165
165
}
590
590
    ret = (PyArrayObject *)PyArray_NewFromDescr(Py_TYPE(self),
591
591
                                PyArray_DESCR(self),
592
592
                                nd, dimensions,
593
 
                                strides, PyArray_DATA(self) + offset,
 
593
                                strides, PyArray_BYTES(self) + offset,
594
594
                                PyArray_FLAGS(self),
595
595
                                (PyObject *)self);
596
596
    if (ret == NULL) {