This file contains hidden or 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
# test the possibility of setting and getting mwe within jitted functions | |
import numpy as np | |
import numba | |
@numba.jit | |
def set_random_seed(_seed): | |
np.random.seed(_seed) |
This file contains hidden or 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
# test the possibility of setting and getting mwe within jitted functions | |
import numpy as np | |
import numba | |
@numba.jit | |
def set_random_seed(_seed): | |
np.random.seed(_seed) |
This file contains hidden or 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
# my answer | |
from tqdm import tqdm | |
subaerial = np.zeros(golfcube.shape[0]) | |
topset = np.zeros(golfcube.shape[0]) | |
for T in tqdm(range(golfcube.shape[0])): | |
# do it with just pixels above sea level | |
Land_A = golfcube['eta'][T,:,:] > golfcube.meta['H_SL'][T] | |
Land_C = np.count_nonzero(Land_A) |
OlderNewer