Skip to content

Commit

Permalink
prereq
Browse files Browse the repository at this point in the history
  • Loading branch information
scivision committed May 24, 2017
1 parent 639a715 commit c30a0e0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions sciencedates/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from pytz import UTC
import numpy as np
from dateutil.parser import parse
from xarray import DataArray
import xarray
#
from matplotlib.dates import DateFormatter
from matplotlib.dates import MinuteLocator,SecondLocator
Expand Down Expand Up @@ -238,7 +238,7 @@ def timeticks(tdiff):
"""
NOTE do NOT use "interval" or ticks are misaligned! use "bysecond" only!
"""
if isinstance(tdiff,DataArray): #len==1
if isinstance(tdiff,xarray.DataArray): #len==1
tdiff = timedelta(microseconds=tdiff.item()/1e3)

assert isinstance(tdiff,timedelta),'expecting datetime.timedelta'
Expand Down
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
try:
import conda.cli
conda.cli.main('install',*req)
except Exception as e:
except ImportError:
pip.main(['install'] + req)
# %%
from setuptools import setup

setup(name='sciencedates',
packages=['sciencedates'],
version = '1.2.5',
version = '1.2.6',
description='Date conversions used in the sciences.',
author = 'Michael Hirsch, Ph.D.',
url = 'https://github.com/scivision/sciencedates',
Expand All @@ -24,5 +24,6 @@
'Programming Language :: Python',
'Programming Language :: Python :: 3',
],
install_requires=req,
)

0 comments on commit c30a0e0

Please sign in to comment.