This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import matplotlib.colors | |
cmap=plt.cm.bwr | |
cmap1=[cmap(i) for i in np.arange(cmap.N)] | |
cen1=int(cmap.N/2) | |
cen2=int(cen1-1) | |
for i in np.arange(cen2-3,cen1+4): | |
print(i) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
start_time = time.time() | |
# put your code here | |
elapsed_time = time.time() - start_time | |
print(time.strftime("%H:%M:%S", time.gmtime(elapsed_time))) |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# I think that this is better than zero as it tell me whether the zero that I will get is becuase of the math or the initiation itself. | |
nlev=len(levP) | |
nh =len(h) | |
nlon=len(lonP) | |
reg_all_ahmed=np.full((nh,nlev,nlon),np.nan) |