Antoine Pitrou

Results 823 comments of Antoine Pitrou

For the first error, you have to pass the signatures as a list: ``` >>> f = vectorize([numba.types.NPDatetime('us')(numba.int64)])(convert_it) [...] TypeError: Invalid datetime metadata string "(us)" at position 1 ```

For the record, here is the truncated gdb trace: ``` Program received signal SIGSEGV, Segmentation fault. Numba_extract_np_datetime (td=0x0) at numba/_helperlib.c:243 243 if (!PyArray_IsScalar(td, Datetime)) { (gdb) bt #0 Numba_extract_np_datetime (td=0x0)...

Besides the crash, the issue here is the function is compiled in object mode (you would get a compilation failure by adding `nopython=True` to the vectorize() call). This is because...

The weird thing here is Numba_extract_np_datetime() gets a null pointer. Here is an excerpt of the unoptimized LLVM code generated by Numba: ``` store i8* null, i8** %.36 %.38 =...

@cpcloud , it seems numpy won't less us call ufuncs with non-unitless datetimes and timedeltas, so we're cooked: ``` >>> def identity(x): return x ... >>> ii = vectorize([types.NPTimedelta('s')(types.NPTimedelta('s'))], nopython=True)(identity)...

cc @raulcd @jorisvandenbossche @lysnikolaou

@mcint Did you generate your response using ChatGPT? It does not seem to make sense at all.

In case someone is reading this who is not a generative IA, answer to the question posted above: > Am I mistaken in assuming "python launcher" that handles finding a...

cc @jorisvandenbossche @mapleFU @wgtmac