summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
Diffstat (limited to 'numpy')
-rw-r--r--numpy/core/src/multiarray/arraytypes.c.src6
-rw-r--r--numpy/core/src/multiarray/getset.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/numpy/core/src/multiarray/arraytypes.c.src b/numpy/core/src/multiarray/arraytypes.c.src
index f61936bdd..f8362b27f 100644
--- a/numpy/core/src/multiarray/arraytypes.c.src
+++ b/numpy/core/src/multiarray/arraytypes.c.src
@@ -627,9 +627,9 @@ VOID_getitem(char *ip, PyArrayObject *ap)
strides[0] = 1;
descr = PyArray_DescrNewFromType(PyArray_BYTE);
u = PyArray_NewFromDescr(&PyArray_Type, descr, 1, dims, strides,
- ip,
- PyArray_ISWRITEABLE(ap) ? NPY_WRITEABLE : 0,
- NULL);
+ ip,
+ PyArray_ISWRITEABLE(ap) ? NPY_ARRAY_WRITEABLE : 0,
+ NULL);
((PyArrayObject*)u)->base = ap;
Py_INCREF(ap);
}
diff --git a/numpy/core/src/multiarray/getset.c b/numpy/core/src/multiarray/getset.c
index 0759cddb8..cbb7ce6e9 100644
--- a/numpy/core/src/multiarray/getset.c
+++ b/numpy/core/src/multiarray/getset.c
@@ -281,7 +281,7 @@ static PyObject *
array_data_get(PyArrayObject *self)
{
#if defined(NPY_PY3K)
- return PyMemoryView_FromObject(self);
+ return PyMemoryView_FromObject((PyObject *)self);
#else
intp nbytes;
if (!(PyArray_ISONESEGMENT(self))) {