8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 09934b2 commit d02ca96Copy full SHA for d02ca96
numpy/core/src/multiarray/buffer.c
@@ -637,6 +637,8 @@ _buffer_get_info(PyObject *obj, int flags)
637
item = PyList_GetItem(item_list, item_list_length - 1);
638
old_info = (_buffer_info_t*)PyLong_AsVoidPtr(item);
639
if (_buffer_info_cmp(info, old_info) != 0) {
640
+ old_info = NULL; /* Can't use this one, but possibly next */
641
+
642
if (item_list_length > 1 && info->ndim > 1) {
643
/*
644
* Some arrays are C- and F-contiguous and if they have more
@@ -654,9 +656,6 @@ _buffer_get_info(PyObject *obj, int flags)
654
656
old_info = NULL;
655
657
}
658
- else {
- old_info = NULL;
659
- }
660
661
662
if (old_info != NULL) {
0 commit comments