datetime64 in cython?

155 views
Skip to first unread message

John Salvatier

unread,
Feb 7, 2012, 8:06:38 PM2/7/12
to cython...@googlegroups.com
Is it possible to declare arrays datetime64 in Cython?  If I try cdef np.ndarray[np.datetime64, ndim = 1] tv 

I get an "invalid type" error. Any way around this?

John

Adam Klein

unread,
Feb 7, 2012, 10:12:18 PM2/7/12
to cython...@googlegroups.com

The way I've been going about this is passing array.view('i8') buffer
into the cython code and treating it as a 64 bit int. No datetime64
support in cython right now -

John Salvatier

unread,
Feb 8, 2012, 1:42:42 AM2/8/12
to cython...@googlegroups.com
Thanks Adam, that makes sense.
Reply all
Reply to author
Forward
0 new messages