Consider the following to create a linear array of size 4:
import numpy as np
cimport numpy as np
cdef np.float64_t [:] a = np.zeros(shape=(4),dtype=np.float64)
a.shape should be (4,). However:
print(a.shape)
>>> [4, 0, 0, 0, 0, 0, 0, 0]
What is going on? The original Python code gives the correct answer:
a = np.zeros(shape=(4),dtype=np.float64)
print(a.shape)
>>> (4,)