Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove use of deprecated np.float #20

Merged
merged 5 commits into from
Jan 18, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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