<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:'times new roman', 'new york', times, serif;font-size:12pt"><div>Hello,</div><div><br></div><div>I've tried to write a small function to merge two Numpy arrays of strings with Cython.</div><div><br></div><div>I need to use efficient indexing. What I've done for array of integers :</div><div><br></div><div>import numpy as np</div><div>cimport numpy as np</div><div>ctypedef np.int_t DTYPE_t</div><div>cdef np.ndarray[DTYPE_t, ndim=1] vecteur_n = np.zeros(vecteur.shape[0], dtype=int)</div><div>...</div><div><br></div><div>But I don't know the equivalent of "ctypedef np.int_t DTYPE_t" for strings, or at least a way of getting around this.</div><div><br></div><div>Thank you for the help,</div><div><br></div><div>JB</div><div><br></div><div><br></div><div><br></div><div><br></div><div style="position:fixed"></div></div><br>
</body></html>