Skip to content

Commit

Permalink
Fixed pytests
Browse files Browse the repository at this point in the history
  • Loading branch information
LiamCPinchbeck committed Sep 4, 2024
1 parent 4d9efa0 commit 17a1301
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def _convert_numeric_columns(self, numeric_type):
# Attempt to convert each column to the specified numeric type.
# If a column contains non-numeric data, it will remain unchanged.
self.df[column] = pd.to_numeric(self.df[column], errors='ignore', downcast='float')
if self.df[column].dtype == np.number or self.df[column].dtype == np.float_:
if self.df[column].dtype == np.number or self.df[column].dtype == float:
self.df[column] = self.df[column].astype(numeric_type)


Expand Down
4 changes: 2 additions & 2 deletions gammabayes/likelihoods/irfs/fov_irf_slicer.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,10 +339,10 @@ def _refresh_buffer_window(self):
else:
lat_stop = -(default_lat_vals[1] - lat_offset)

if lon_stop is 0:
if lon_stop == 0:
lon_stop = None

if lat_stop is 0:
if lat_stop == 0:
lat_stop = None

self.buffer_window = (
Expand Down
2 changes: 1 addition & 1 deletion tests/test_3_irfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def test_irf_input_output():

irf_loglike = IRF_LogLikelihood(axes=[energy_recon_axis, longitudeaxis, latitudeaxis],
dependent_axes = [energy_true_axis, longitudeaxistrue, latitudeaxistrue],
pointing_direction=np.asarray([10,10]).T,
pointing_dir=np.asarray([10,10])*u.deg,
zenith=40,
hemisphere='North',
prod_vers=5)
Expand Down

0 comments on commit 17a1301

Please sign in to comment.