blob: e2bac0e4ac98cfd382d8f226553f9c9d70eddd44 (
plain)
1
2
3
4
5
6
7
8
|
from cpython cimport array
import array
cdef array.array int_array_template = array.array('i', [])
cdef array.array newarray
# create an array with 3 elements with same type as template
newarray = array.clone(int_array_template, 3, zero=False)
|