blob: 2eb80349921cee3b94935c60cb3c2a35b394d12a (
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)
|