Open guzuomuse opened 3 years ago
Unfortunately, Pythran currently doesn't supports structured array. Let's take this issue as an opportunity to discuss the would-be signature:
# (1)
#pythran export fn((char[16], (float64, float64))[:]
# (2)
#pythran export fn((np.str_[16], (float64, float64))[:]
I tend to prefer (1) but I don't have a lot of background with that feature, so I'm really open to suggestions.
I'm not a big user of structured arrays, but I would avoid using the np
namespace in pythran signatures, as it's inconsistent with other syntax (we don't say np.float64 either). I'm also a bit vary of adding char
, considering that str
and str_
are equivalent for numpy dtypes, does anything speak against
#pythran export fn((str[15], (float64, float64))[:])
?
how to organize the signatures? is it possible like numba does from numpy dtype?