小编Pad*_*wat的帖子

OSError:请求了269892000,并写入了299188084

在执行“ array.tofile(fp)”行时,出现OSError,它显示“ OSError:269892000请求并写入了299188084”。我能确切知道这是什么意思,对此可能的解决方案是什么?

def write_array(fp, array, version=None, allow_pickle=True, pickle_kwargs=None):
    ...
    ...**strong text**
    _check_version(version)
    used_ver = _write_array_header(fp, header_data_from_array_1_0(array),
                                   version)
    # this warning can be removed when 1.9 has aged enough
    if version != (2, 0) and used_ver == (2, 0):
        warnings.warn("Stored array in format 2.0. It can only be"
                      "read by NumPy >= 1.9", UserWarning)

# Set buffer size to 16 MiB to hide the Python loop overhead.
buffersize = max(16 * 1024 ** 2 // array.itemsize, 1)

if array.dtype.hasobject:
    # …
Run Code Online (Sandbox Code Playgroud)

python-3.x

6
推荐指数
2
解决办法
4283
查看次数

标签 统计

python-3.x ×1