-
-
Notifications
You must be signed in to change notification settings - Fork 35
Open
Description
Describe the bug
When creating a blosc2.NDArray with shape=0, subsequent resize() and concat() operations fail or behave unexpectedly.
To Reproduce
Steps to reproduce the behavior:
import blosc2
import numpy as np
# Define dtype
dt = np.int64
# Create empty array (shape=0)
my_array = blosc2.zeros(shape=0, dtype=dt)
# Resize causes crash
my_array.resize((1,))
Output error:
Process finished with exit code 136 (interrupted by signal 8:SIGFPE)
Expected behavior
Should be able to resize array from shape=0 to any size, and concatenate empty arrays with non-empty arrays.
Desktop (please complete the following information):
- Python 3.12.4
- Blosc2 version: 4.0.0-b2.dev0
- OS: Ubuntu 24.04.3 LTS
Additional context
This issue affects the implementation of dynamically growing columnar tables where columns need to start empty and grow as data is appended. The crash (SIGFPE) suggests a division by zero or arithmetic exception at the C level when handling zero-sized arrays.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels