[SciPy-Dev] Baffled by type_check.datetime_data

David Goldsmith d.l.goldsmith@gmail....
Tue Apr 27 20:57:43 CDT 2010

>>> np.version.version
>>> from numpy.lib.type_check import datetime_data as dtd
>>> help(dtd)
Help on function datetime_data in module numpy.lib.type_check:

    Return (unit, numerator, denominator, events) from a datetime dtype

>>> np.dtype(np.datetime_)
>>> dtd(np.datetime_)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Python26\lib\site-packages\numpy\lib\type_check.py", line 611, in
    if dtype.kind not in ['m','M']:
AttributeError: type object 'numpy.datetime64' has no attribute 'kind'
>>> for key in np.sctypes.keys():
...     for val in np.sctypes[key]:
...         if 'kind' in dir(val):
...             print np.sctype[key][val]

Bug, or failure to understand usage?  (If the latter, someone please


Mathematician: noun, someone who disavows certainty when their uncertainty
set is non-empty, even if that set has measure zero.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-dev/attachments/20100427/336e57cb/attachment-0001.html 

More information about the SciPy-Dev mailing list