From this doc, here is the quote:

PyObject <http://www.python.org/doc//current/c-api/structures.html#PyObject>
* PySlice_New(PyObject<http://www.python.org/doc//current/c-api/structures.html#PyObject>
* *start*, PyObject<http://www.python.org/doc//current/c-api/structures.html#PyObject>
* *stop*, PyObject<http://www.python.org/doc//current/c-api/structures.html#PyObject>
* *step*) <http://www.python.org/doc//current/c-api/slice.html#PySlice_New>
*Return value: New reference.*

Return a new slice object with the given values. The *start*, *stop*, and *
step* parameters are used as the values of the slice object attributes of
the same names. Any of the values may be *NULL*, in which case the None will
be used for the corresponding attribute. Return *NULL* if the new object
could not be allocated.


The interresting part is: "Any of the value may be NULL, in which case the
None will be used". None is the default value. For start, it mean 0, for
stop, it mean the end of the object in that dimensions, for step, it mean 1.




On Mon, Jul 29, 2013 at 1:15 PM, Ludwig Schmidt-Hackenberg <
notifications@github.com> wrote:

> In theano/sandbox/cuda/basic_ops.py:
>
> > +            Py_XDECREF(slice);
> > +            Py_XDECREF(out_sub);
> > +            Py_XDECREF(start);
> > +            Py_XDECREF(stop);
> > +            Py_XDECREF(step);
> > +        }
> > +
> > +        if(axis==1)
> > +        {
> > +            PyObject *slice_tuple;
> > +            PyObject *full_slice;
> > +            PyObject *section_slice;
> > +            PyObject *start_axis2, *stop_axis2;
> > +
> > +            start = PyInt_FromLong(0);
> > +            stop = PyInt_FromLong(dims_out[0]);
>
> Changed that. How do you know this? The only documentation I founc on
> PySlice_New is http://www.python.org/doc//current/c-api/slice.html
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/Theano/Theano/pull/1469/files#r5455428>
> .
>