简体   繁体   中英

Python/Numpy error: NULL result without error in PyObject_Call

I've never seen this error before, and none of the hits on Google seem to apply. I've got a very large NumPy array that holds Boolean values. When I try writing the array using numpy.dump(), I get the following error:

SystemError: NULL result without error in PyObject_Call

The array is initialized with all False values, and the only time I ever access it is to set some of the values to True, so I have no idea why any of the values would be null.

When I try running the same program with a smaller array, I get no error. However, since the error occurs at the writing step, I don't think that it's a memory issue. Has anybody else seen this error before?

That message comes directly from the CPython interpreter (see abstract.c method PyObject_Call). You may get a better response on a Python or NumPy mailing list regarding that error message because it looks like a problem in C code.

Write a simple example to demonstrating the problem and you should be able to narrow the issue down to a module then a method.

It appears that this may have been an error from using the 32-bit version of NumPy and not the 64 bit. For whatever reason, though the program has no problem keeping the array in memory, it trips up when writing the array to a file if the number of elements in the array is greater than 2^32.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM