Skip to content

Commit

Permalink
fix line that fails using a newer version of numpy (#425)
Browse files Browse the repository at this point in the history
* fix line that fails using a newer version of numpy that was installed when testing python 3.12.0

* remove code smell to appease SonarQube
  • Loading branch information
georgemccabe authored Feb 18, 2025
1 parent f4d4b93 commit a1a1ba1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions metcalcpy/contributed/blocking_weather_regime/Blocking.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,12 +352,11 @@ def run_Calc_Blocks(self,ibl,GIBL,lon,tsin):
locbi = np.array([locb[0]])
ll1=0
pass1 = 0
ai=[0]
add=0
for ll in np.arange(0,len(locb)-1,1):
if ((dd[locb[ll+1].astype(int)] - dd[locb[ll1].astype(int)]) >=1) & ((dd[locb[ll+1].astype(int)] - dd[locb[ll1].astype(int)]) <=2):
add = datemp[ll1] + datemp[ll+1]
ai = np.where(add==2)[0]
ai = np.where(np.atleast_1d(add == 2))[0]
if len(ai)>overlap:
locbi=np.append(locbi,locb[ll+1])
ll1=ll+1
Expand Down

0 comments on commit a1a1ba1

Please sign in to comment.