Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 674a42b

Browse files
author
Stefan Krah
committed
Fix error messages.
1 parent 702a5dc commit 674a42b

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

Objects/memoryobject.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,8 @@ equiv_structure(const Py_buffer *dest, const Py_buffer *src)
307307
if (!equiv_format(dest, src) ||
308308
!equiv_shape(dest, src)) {
309309
PyErr_SetString(PyExc_ValueError,
310-
"ndarray assignment: lvalue and rvalue have different structures");
310+
"memoryview assignment: lvalue and rvalue have different "
311+
"structures");
311312
return 0;
312313
}
313314

@@ -1433,7 +1434,7 @@ memory_getbuf(PyMemoryViewObject *self, Py_buffer *view, int flags)
14331434
/* PyBUF_SIMPLE|PyBUF_FORMAT and PyBUF_WRITABLE|PyBUF_FORMAT do
14341435
not make sense. */
14351436
PyErr_Format(PyExc_BufferError,
1436-
"ndarray: cannot cast to unsigned bytes if the format flag "
1437+
"memoryview: cannot cast to unsigned bytes if the format flag "
14371438
"is present");
14381439
return -1;
14391440
}

0 commit comments

Comments
 (0)