Skip to content

Commit

Permalink
Merge pull request #13 from rtellez700/smi-dev
Browse files Browse the repository at this point in the history
change equality operator to np.array_equal for numpy>=1.19.0 compatibility
  • Loading branch information
gfreychet authored Aug 31, 2023
2 parents 6569831 + 8e6e0f6 commit 96dd714
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions smi_analysis/SMI_beamline.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ def caking(self, radial_range=None, azimuth_range=None, npt_rad=500, npt_azim=50
azimuth_range = (-180, 180)

if self.geometry == 'Transmission':
if self.inpaints == []:
if np.array_equal(self.inpaints, []):
self.inpainting()
self.cake, self.q_cake, self.chi_cake = integrate1D.cake_saxs(self.inpaints,
self.ai,
Expand All @@ -276,7 +276,7 @@ def radial_averaging(self, radial_range=None, azimuth_range=None, npt=2000):
self.q_rad, self.I_rad = [], []

if self.geometry == 'Transmission':
if self.inpaints == []:
if np.array_equal(self.inpaints, []):
self.inpainting()
if radial_range is None and (self.detector == 'Pilatus300kw' or self.detector == 'Pilatus900kw'):
radial_range = (0.001, np.sqrt(self.qp[1]**2 + self.qz[1]**2))
Expand Down Expand Up @@ -331,7 +331,7 @@ def azimuthal_averaging(self, radial_range=None, azimuth_range=None, npt_rad=500
if azimuth_range is None and self.detector == 'Pilatus1m':
azimuth_range = (-180, 180)

if self.cake == []:
if np.array_equal(self.cake, []):
self.caking(radial_range=radial_range,
azimuth_range=azimuth_range,
npt_rad=npt_rad,
Expand Down

0 comments on commit 96dd714

Please sign in to comment.