summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
authorEric Wieser <wieser.eric@gmail.com>2020-02-03 19:14:45 +0000
committerEric Wieser <wieser.eric@gmail.com>2020-02-03 19:17:02 +0000
commit6358196549db3d4daba3ba212c19f17ee7af6a96 (patch)
treeadcbbf3397428606a04e709a201bb88ed6db3fee /numpy
parent42730767439795c98ab5e9f5e47c90c661b2fe46 (diff)
downloadnumpy-6358196549db3d4daba3ba212c19f17ee7af6a96.tar.gz
MAINT: Use True/False instead of 1/0 in np.dtype.__reduce__
This doesn't really make much difference, but is a little more correct, a little faster, and produces two fewer bytes of pickle data.
Diffstat (limited to 'numpy')
-rw-r--r--numpy/core/src/multiarray/descriptor.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/core/src/multiarray/descriptor.c b/numpy/core/src/multiarray/descriptor.c
index 0f35e867c..4f653ded6 100644
--- a/numpy/core/src/multiarray/descriptor.c
+++ b/numpy/core/src/multiarray/descriptor.c
@@ -2420,7 +2420,7 @@ arraydescr_reduce(PyArray_Descr *self, PyObject *NPY_UNUSED(args))
}
obj = PyUString_FromFormat("%c%d",self->kind, elsize);
}
- PyTuple_SET_ITEM(ret, 1, Py_BuildValue("(Nii)", obj, 0, 1));
+ PyTuple_SET_ITEM(ret, 1, Py_BuildValue("(NOO)", obj, Py_False, Py_True));
/*
* Now return the state which is at least byteorder,