numpy 1.22.4 Pypi GitHub Homepage
Other Docs
ParametersReturns
datetime_data(dtype, /)

The returned tuple can be passed as the second argument of numpy.datetime64 and numpy.timedelta64 .

Parameters

dtype : dtype

The dtype object, which must be a datetime64 or timedelta64 type.

Returns

unit : str

The datetime unit <arrays.dtypes.dateunits> on which this dtype is based.

count : int

The number of base units in a step.

Get information about the step size of a date or time type.

Examples

>>> dt_25s = np.dtype('timedelta64[25s]')
... np.datetime_data(dt_25s) ('s', 25)
>>> np.array(10, dt_25s).astype('timedelta64[s]')
array(250, dtype='timedelta64[s]')

The result can be used to construct a datetime that uses the same units as a timedelta

>>> np.datetime64('2010', np.datetime_data(dt_25s))
numpy.datetime64('2010-01-01T00:00:00','25s')
See :

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


GitHub : None#None
type: <class 'builtin_function_or_method'>
Commit: