-
-
Notifications
You must be signed in to change notification settings - Fork 9.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ENH: rec.array load from bytes should refuse object dtype #23132
Comments
It really can't work to load what
|
Will loading object arrays be supported or just forbidden? the loading works if it follows the |
Loading objects from This is very much a: don't do it, unless you know how it works (i.e. you know how object lifetime management works in Python, which practically means knowing the C-API well). Even if you do, you probably don't have a good enough reason to actually do it and make sure it is safe. You can use
|
Describe the issue:
If a rec array contains object dtype, after converting it to bytes and saving to disk, the data cannot be loaded back by another script but the code works if the saving and loading are within the same file.
Please see the attached reproduce code for example. First, run a.py, the code works without issue. Later, run b.py it will throw a Segmentation fault error.
Reproduce the code example:
Error message:
Runtime information:
1.24.1
3.8.13 (default, Mar 28 2022, 11:38:47)
[GCC 7.5.0]
[{'simd_extensions': {'baseline': ['SSE', 'SSE2', 'SSE3'],
'found': ['SSSE3',
'SSE41',
'POPCNT',
'SSE42',
'AVX',
'F16C',
'FMA3',
'AVX2',
'AVX512F',
'AVX512CD',
'AVX512_SKX',
'AVX512_CLX'],
'not_found': ['AVX512_KNL',
'AVX512_KNM',
'AVX512_CNL',
'AVX512_ICL']}},
{'architecture': 'SkylakeX',
'filepath': '/home/xxx/miniconda3/envs/py38/lib/python3.8/site-packages/numpy.libs/libopenblas64_p-r0-15028c96.3.21.so',
'internal_api': 'openblas',
'num_threads': 8,
'prefix': 'libopenblas',
'threading_layer': 'pthreads',
'user_api': 'blas',
'version': '0.3.21'}]
Context for the issue:
No response
The text was updated successfully, but these errors were encountered: