From a NumPy array: dtype is optional - From a NumPy array: dtype is optional - 2026.1 English - UG1864

Vitis Functional Simulation User Guide (UG1864)

Document_ID
UG1864
Release_Date
2026-06-23
Version
2026.1 English
np_data = np.array([1, 2, 3, 4], dtype=np.int32)

a = va.array(np_data)                  # inferred: va.int32
b = va.array(np_data, dtype=va.int16)  # explicit
c = va.array(np_data, dtype="int32")   # string form

Inference fails for NumPy dtypes that do not map to a varray type (for example, if they are complex without a complex target). Pass an explicit dtype= in such cases. A NumPy dtype (for example, np.int32) is not a valid dtype= value. Always use the va.* class or the string name.