@@ -2641,51 +2641,6 @@ array_complex(PyArrayObject *self, PyObject *NPY_UNUSED(args))
26412641 return c ;
26422642}
26432643
2644- #ifndef NPY_PY3K
2645-
2646- static PyObject *
2647- array_getslice (PyArrayObject * self , PyObject * args )
2648- {
2649- PyObject * start , * stop , * slice , * result ;
2650- if (!PyArg_ParseTuple (args , "OO:__getslice__" , & start , & stop )) {
2651- return NULL ;
2652- }
2653-
2654- slice = PySlice_New (start , stop , NULL );
2655- if (slice == NULL ) {
2656- return NULL ;
2657- }
2658-
2659- /* Deliberately delegate to subclasses */
2660- result = PyObject_GetItem ((PyObject * )self , slice );
2661- Py_DECREF (slice );
2662- return result ;
2663- }
2664-
2665- static PyObject *
2666- array_setslice (PyArrayObject * self , PyObject * args )
2667- {
2668- PyObject * start , * stop , * value , * slice ;
2669- if (!PyArg_ParseTuple (args , "OOO:__setslice__" , & start , & stop , & value )) {
2670- return NULL ;
2671- }
2672-
2673- slice = PySlice_New (start , stop , NULL );
2674- if (slice == NULL ) {
2675- return NULL ;
2676- }
2677-
2678- /* Deliberately delegate to subclasses */
2679- if (PyObject_SetItem ((PyObject * )self , slice , value ) < 0 ) {
2680- Py_DECREF (slice );
2681- return NULL ;
2682- }
2683- Py_DECREF (slice );
2684- Py_RETURN_NONE ;
2685- }
2686-
2687- #endif
2688-
26892644NPY_NO_EXPORT PyMethodDef array_methods [] = {
26902645
26912646 /* for subtypes */
@@ -2743,23 +2698,6 @@ NPY_NO_EXPORT PyMethodDef array_methods[] = {
27432698 (PyCFunction ) array_format ,
27442699 METH_VARARGS , NULL },
27452700
2746- #ifndef NPY_PY3K
2747- /*
2748- * While we could put these in `tp_sequence`, its' easier to define them
2749- * in terms of PyObject* arguments.
2750- *
2751- * We must provide these for compatibility with code that calls them
2752- * directly. They are already deprecated at a language level in python 2.7,
2753- * but are removed outright in python 3.
2754- */
2755- {"__getslice__" ,
2756- (PyCFunction ) array_getslice ,
2757- METH_VARARGS , NULL },
2758- {"__setslice__" ,
2759- (PyCFunction ) array_setslice ,
2760- METH_VARARGS , NULL },
2761- #endif
2762-
27632701 /* Original and Extended methods added 2005 */
27642702 {"all" ,
27652703 (PyCFunction )array_all ,
0 commit comments