Install & Compatibility
Where this runs
tested against v1.2.1 · 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.910 runs
installs and imports cleanly · install 0.0s · import 0.213s · 90.7MB
glibcpy 3.10–3.910 runs
installs and imports cleanly · install 3.9s · import 0.228s · 87MB
90MB installed
● package 90MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
astype_array
✓ from arraykit import astype_array
Commonly used for flexible conversion of various inputs to NumPy arrays.
is_objectable
✓ from arraykit import is_objectable
Useful for checking if a value can be placed in a NumPy object array.
delimited_to_arrays
✓ from arraykit import delimited_to_arrays
For parsing delimited string data into arrays.
This quickstart demonstrates how to use `astype_array` to convert various Python sequences into NumPy arrays with optional dtype specification. It also shows `is_objectable` for checking type compatibility with object arrays.
import numpy as np
from arraykit import astype_array
# Convert a list to a NumPy array with a specified dtype
data_int = [1, 2, 3, 4]
array_float = astype_array(data_int, dtype=np.float64)
print(f"Original list: {data_int}")
print(f"Converted array (float64): {array_float}, dtype: {array_float.dtype}\n")
# Convert mixed data; typically results in an object dtype if types are incompatible
mixed_data = [10, 'hello', 20.5, True]
array_object = astype_array(mixed_data)
print(f"Original mixed data: {mixed_data}")
print(f"Converted array (object): {array_object}, dtype: {array_object.dtype}\n")
# Using is_objectable
from arraykit import is_objectable
print(f"Is 'hello' objectable? {is_objectable('hello')}")
print(f"Is np.datetime64('2023-01-01') objectable? {is_objectable(np.datetime64('2023-01-01'))}")
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'arraykit'
The 'arraykit' package has not been installed in the current Python environment.
fixRun `pip install arraykit` to install the package.
AttributeError: module 'arraykit' has no attribute 'astype_array'
The specific function `astype_array` was added in version 1.1.0. This error occurs if you are using an older version of arraykit or have a typo in the function name.
fixUpgrade your arraykit installation to the latest version (`pip install --upgrade arraykit`) or verify the function name against the documentation for your installed version.
ValueError: invalid literal for int() with base 10: 'a'
This error typically occurs when using `astype_array` (or similar functions) to convert a sequence containing non-numeric strings to a numeric NumPy dtype (e.g., `np.int64`, `np.float64`).
fixEnsure that all elements in the input sequence are compatible with the target `dtype`. If the sequence contains mixed types (e.g., strings and numbers), consider using `dtype=object` or pre-process the data to handle non-numeric values.
Upgrade
Version history
1.2.1latest on PyPI · released Feb 4, 2026
Audit
Dependencies
numpyrequiredCore functionality relies on NumPy arrays and data types.