Skip to content

Commit

Permalink
Merge pull request #20 from sot/deprecated-np-dtypes
Browse files Browse the repository at this point in the history
remove use of deprecated np.float
  • Loading branch information
javierggt authored Jan 18, 2022
2 parents 59fffbc + 9f062fc commit f2fc351
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions Ska/Matplotlib/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from matplotlib.dates import (YearLocator, MonthLocator, DayLocator,
HourLocator, MinuteLocator, SecondLocator,
DateFormatter, epoch2num)
DateFormatter, date2num)
from matplotlib.ticker import FixedLocator, FixedFormatter
from Chandra.Time import DateTime
from cxotime import CxoTime
Expand Down Expand Up @@ -185,8 +185,7 @@ def cxctime2plotdate(times):

# Find the plotdate of first time and use a relative offset from there
times = times.ravel()
t0 = CxoTime(times[0]).unix
plotdate0 = epoch2num(t0)
plotdate0 = date2num(CxoTime(times[0]).datetime)
out = (times - times[0]) / 86400. + plotdate0

return out.reshape(shape)
Expand Down Expand Up @@ -239,8 +238,8 @@ def hist_outline(dataIn, *args, **kwargs):

stepSize = binsIn[1] - binsIn[0]

bins = np.zeros(len(binsIn)*2 + 2, dtype=np.float)
data = np.zeros(len(binsIn)*2 + 2, dtype=np.float)
bins = np.zeros(len(binsIn)*2 + 2, dtype=float)
data = np.zeros(len(binsIn)*2 + 2, dtype=float)
for bb in range(len(binsIn)):
bins[2*bb + 1] = binsIn[bb]
bins[2*bb + 2] = binsIn[bb] + stepSize
Expand Down

0 comments on commit f2fc351

Please sign in to comment.