Return a :class:`datetime.datetime` object for the array of characters. Args: timearr (:class:`numpy.ndarray`): An array of characters. Returns: :class:`datetime.datetime`: A datetime object.
(timearr)
| 2316 | |
| 2317 | |
| 2318 | def _make_time(timearr): |
| 2319 | """Return a :class:`datetime.datetime` object for the array of characters. |
| 2320 | |
| 2321 | Args: |
| 2322 | |
| 2323 | timearr (:class:`numpy.ndarray`): An array of characters. |
| 2324 | |
| 2325 | Returns: |
| 2326 | |
| 2327 | :class:`datetime.datetime`: A datetime object. |
| 2328 | |
| 2329 | """ |
| 2330 | try: |
| 2331 | return dt.datetime.strptime("".join(npbytes_to_str(timearr)), |
| 2332 | "%Y-%m-%d_%H:%M:%S") |
| 2333 | except ValueError: |
| 2334 | return np.datetime64("NaT") |
| 2335 | |
| 2336 | |
| 2337 | def _file_times(wrfin, do_xtime): |
no test coverage detected