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