Install & Compatibility
Where this runs
tested against v0.15.5 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.920 runs
installs and imports cleanly · install 0.0s · import 0.690s · 91.2MB
glibcpy 3.10–3.920 runs
installs and imports cleanly · install 3.7s · import 0.598s · 87MB
91MB installed
● package 91MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
awkward0
✓ import awkward0
✗ import awkward0
This quickstart demonstrates creating an `awkward0` array from nested Python lists, performing a vectorized NumPy operation on it, accessing elements using array slicing, and converting it back to a standard Python list of lists. `awkward0.fromiter` is a common way to initialize arrays from arbitrary Python structures, though it can be slow for large datasets.
import awkward0
import numpy as np
# Create a jagged array from a Python list of lists
array = awkward0.fromiter([[1.1, 2.2, None], [3.3], [4.4, 5.5, 6.6, None]])
print('Original array:')
print(array)
# Perform a vectorized operation (e.g., square root)
sqrt_array = np.sqrt(array)
print('\nSquare root of array:')
print(sqrt_array)
# Access elements using NumPy-like indexing
first_elements = array[:, 0]
print('\nFirst element of each sublist:')
print(first_elements)
# Convert back to a Python list of lists
list_representation = array.tolist()
print('\nList representation:')
print(list_representation)
Debug
Known issues
breakingThe `awkward` package was renamed to `awkward0` starting with version 0.15.0 to avoid conflicts with the new, incompatible Awkward 1.x series (now simply `awkward`). Code using `import awkward` will now import the 1.x series and fail if expecting 0.x behavior.fixAlways use `import awkward0` when intending to use this 0.x branch of the library. If migrating to the newer library, refer to `awkward` (1.x) documentation for new import paths and API changes.
affects: >=0.15.0
deprecatedThe entire `awkward0` library is deprecated and is no longer actively developed. Users are strongly encouraged to migrate to the `awkward` library (formerly `awkward1`) for ongoing development, new features, and improved performance.fixPlan a migration to the `awkward` package (`pip install awkward`). The newer library offers tools like `ak.from_awkward0` and `ak.to_awkward0` for gradual adoption.
affects: All 0.x versions
gotchaDirect saving/loading with `awkward0.save()` or `awkward0.load()` produces a custom format (essentially pickled ZIP archives) that is *not* compatible with the `awkward` (1.x) library. It also might not offer lazy loading for subfields as efficiently as other formats.fixIf interoperability with `awkward` (1.x) or standard formats is needed, consider converting to/from `pyarrow` or `HDF5` using optional dependencies, or use `ak.to_awkward0`/`ak.from_awkward0` to convert to the newer library's format before saving/loading.
affects: All 0.x versions
gotchaNumPy 1.20+ introduced deprecation warnings for `np.str` and `np.bool`. While `awkward0` version 0.15.5 fixed the `np.str` warning, older `awkward0` versions might still show warnings when used with newer NumPy versions.fixUpdate `awkward0` to 0.15.5 or later. If updating is not possible, these are usually just warnings and do not break functionality, but indicate areas that might break in future NumPy versions.
affects: <0.15.5
gotchaAwkward 0 arrays (like Awkward 1) are largely immutable in their structure. While some properties were mutable as a user convenience in Awkward 0, direct in-place modification of array layouts is generally not supported, which can be a shift for users accustomed to fully mutable Python lists or NumPy arrays.fixOperations typically return a *new* Awkward Array. If mutable behavior is critical, consider using `awkward0.fromiter` to rebuild or convert to Python lists for modification, then back to Awkward. Understand that this might incur performance costs.
affects: All 0.x versions
Upgrade
Version history
0.15.5latest on PyPI · released Feb 8, 2021
Audit
Dependencies
numpyrequiredCore dependency for array manipulation and numerical operations.
pyarrowoptionalRecommended for reading/writing Arrow and Parquet data.
h5pyoptionalRecommended for reading/writing Awkward Arrays in HDF5 files.
pandasoptionalProvides an alternative view and interoperability.