@@ -738,6 +738,7 @@ array_might_be_written(PyArrayObject *obj)
738738 "The quick fix is to make an explicit copy (e.g., do\n"
739739 "arr.diagonal().copy() or arr[['f0','f1']].copy())." ;
740740 if (PyArray_FLAGS (obj ) & NPY_ARRAY_WARN_ON_WRITE ) {
741+ /* 2012-07-17, 1.7 */
741742 if (DEPRECATE_FUTUREWARNING (msg ) < 0 ) {
742743 return -1 ;
743744 }
@@ -1345,6 +1346,7 @@ array_richcompare(PyArrayObject *self, PyObject *other, int cmp_op)
13451346 break ;
13461347 case Py_EQ :
13471348 if (other == Py_None ) {
1349+ /* 2013-07-25, 1.7 */
13481350 if (DEPRECATE_FUTUREWARNING ("comparison to `None` will result in "
13491351 "an elementwise object comparison in the future." ) < 0 ) {
13501352 return NULL ;
@@ -1368,6 +1370,7 @@ array_richcompare(PyArrayObject *self, PyObject *other, int cmp_op)
13681370 * this way.
13691371 */
13701372 if (array_other == NULL ) {
1373+ /* 2015-05-07, 1.10 */
13711374 PyErr_Clear ();
13721375 if (DEPRECATE (
13731376 "elementwise == comparison failed and returning scalar "
@@ -1382,6 +1385,7 @@ array_richcompare(PyArrayObject *self, PyObject *other, int cmp_op)
13821385 PyArray_DESCR (array_other ),
13831386 NPY_EQUIV_CASTING );
13841387 if (_res == 0 ) {
1388+ /* 2015-05-07, 1.10 */
13851389 Py_DECREF (array_other );
13861390 if (DEPRECATE_FUTUREWARNING (
13871391 "elementwise == comparison failed and returning scalar "
@@ -1417,6 +1421,7 @@ array_richcompare(PyArrayObject *self, PyObject *other, int cmp_op)
14171421 * Comparisons should raise errors when element-wise comparison
14181422 * is not possible.
14191423 */
1424+ /* 2015-05-14, 1.10 */
14201425 PyErr_Clear ();
14211426 if (DEPRECATE ("elementwise == comparison failed; "
14221427 "this will raise an error in the future." ) < 0 ) {
@@ -1429,6 +1434,7 @@ array_richcompare(PyArrayObject *self, PyObject *other, int cmp_op)
14291434 break ;
14301435 case Py_NE :
14311436 if (other == Py_None ) {
1437+ /* 2013-07-25, 1.8 */
14321438 if (DEPRECATE_FUTUREWARNING ("comparison to `None` will result in "
14331439 "an elementwise object comparison in the future." ) < 0 ) {
14341440 return NULL ;
@@ -1452,6 +1458,7 @@ array_richcompare(PyArrayObject *self, PyObject *other, int cmp_op)
14521458 * this way.
14531459 */
14541460 if (array_other == NULL ) {
1461+ /* 2015-05-07, 1.10 */
14551462 PyErr_Clear ();
14561463 if (DEPRECATE (
14571464 "elementwise != comparison failed and returning scalar "
@@ -1466,6 +1473,7 @@ array_richcompare(PyArrayObject *self, PyObject *other, int cmp_op)
14661473 PyArray_DESCR (array_other ),
14671474 NPY_EQUIV_CASTING );
14681475 if (_res == 0 ) {
1476+ /* 2015-05-07, 1.10 */
14691477 Py_DECREF (array_other );
14701478 if (DEPRECATE_FUTUREWARNING (
14711479 "elementwise != comparison failed and returning scalar "
@@ -1495,6 +1503,7 @@ array_richcompare(PyArrayObject *self, PyObject *other, int cmp_op)
14951503 * Comparisons should raise errors when element-wise comparison
14961504 * is not possible.
14971505 */
1506+ /* 2015-05-14, 1.10 */
14981507 PyErr_Clear ();
14991508 if (DEPRECATE ("elementwise != comparison failed; "
15001509 "this will raise an error in the future." ) < 0 ) {
0 commit comments