Lines Matching defs:offset
93 Py_ssize_t offset; /* start of the array relative to data */
109 ndbuf_new(Py_ssize_t nitems, Py_ssize_t itemsize, Py_ssize_t offset, int flags)
116 if (offset % itemsize) {
118 "offset must be a multiple of itemsize");
121 if (offset < 0 || offset+itemsize > len) {
122 PyErr_SetString(PyExc_ValueError, "offset out of bounds");
135 ndbuf->offset= offset;
255 nd->head->offset = -1;
305 PyObject *args, *offset;
337 offset = NULL;
344 Py_XDECREF(offset);
345 offset = PyLong_FromSsize_t(i*itemsize);
346 if (offset == NULL) {
350 PyTuple_SET_ITEM(args, 1, offset);
380 /* args[1]: offset is either NULL or should be dealloc'd */
741 state of the memory is still undefined and ndbuf->offset is disregarded.
752 | offset | OK | OK | OK |
915 offset := start of the array
929 verify_structure(Py_ssize_t len, Py_ssize_t itemsize, Py_ssize_t offset,
938 if (ndim == 0 && (offset < 0 || offset+itemsize > len))
959 if (imin + offset < 0 || imax + offset + itemsize > len)
1006 Input (with offset and negative strides):
1010 offset = 8
1026 suboffsets[0] is the same as the offset that one would specify if
1061 /* imin: minimum index of the input array relative to ndbuf->offset.
1062 suboffset0: offset for each sub-array of the output. This is the
1076 start = addsize + ndbuf->offset + imin;
1104 ndbuf->offset = 0;
1150 if (verify_structure(base->len, base->itemsize, ndbuf->offset,
1155 base->buf = ndbuf->data + ndbuf->offset;
1178 Py_ssize_t offset, PyObject *format, int flags)
1241 ndbuf = ndbuf_new(nitems, itemsize, offset, flags);
1266 Py_ssize_t offset, PyObject *format, int flags)
1270 ndbuf = init_ndbuf(items, shape, strides, offset, format, flags);
1284 "obj", "shape", "strides", "offset", "format", "flags", "getbuf", NULL
1289 Py_ssize_t offset = 0; /* buffer offset */
1297 &v, &shape, &strides, &offset, &format, &flags, &getbuf))
1302 if (strides || offset || format != simple_format ||
1341 return ndarray_push_base(nd, v, shape, strides, offset, format, flags);
1350 "items", "shape", "strides", "offset", "format", "flags", NULL
1356 Py_ssize_t offset = 0; /* buffer offset */
1360 &items, &shape, &strides, &offset, &format, &flags))
1381 offset, format, flags) < 0)
2013 return PyLong_FromSsize_t(ndbuf->offset);
2132 { "offset", (getter)ndarray_get_offset, NULL, NULL, NULL},