Skip to content
This repository has been archived by the owner on Feb 27, 2023. It is now read-only.

Commit

Permalink
Merge pull request #10 from ocefpaf/fix_cftime
Browse files Browse the repository at this point in the history
fix cftime
  • Loading branch information
ocefpaf authored Jul 12, 2018
2 parents 93708e0 + 9cf082e commit adf6f37
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ioos_tools/tardis.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from datetime import datetime

import netcdftime
import cftime
import numpy as np
import pandas as pd
from scipy.spatial import cKDTree as KDTree
Expand Down Expand Up @@ -652,7 +652,7 @@ def _add_iris_coord(cube, name, points, dim, units=None, aux=False):

# Convert datetime objects to Iris' current datetime representation.
if isinstance(points, np.ndarray) and points.dtype == object:
dt_types = (datetime, netcdftime.datetime)
dt_types = (datetime, cftime.datetime)
if all([isinstance(i, dt_types) for i in points]):
points = units.date2num(points)

Expand Down

0 comments on commit adf6f37

Please sign in to comment.