concatenate_none¶
- concatenate_none(old_arr, new_arr)[source]¶
Concatenate arrays, handling None values gracefully.
This utility function concatenates new_arr to old_arr along the first axis. If old_arr is None, it returns new_arr directly. Supports both NumPy and Dask arrays.
- Parameters:
old_arr (np.ndarray | da.Array | None) – Existing array to append to. Can be None.
new_arr (np.ndarray | da.Array) – New array to append.
- Returns:
Concatenated array of the same type as new_arr.
- Return type:
np.ndarray | da.Array