Open geosciz opened 7 years ago
A recent update of numpy package to version 1.13.0 changes the behavior of generators.py. See an example as follows.
numpy
1.13.0
generators.py
import numpy as np from floater.generators import FloatSet lon = np.arange(0, 9, dtype=np.float32) lat = np.arange(-4, 5, dtype=np.float32) land_mask = np.full(81, True, dtype=bool) land_mask.shape = (len(lat), len(lon)) land_mask[:,0:2] = False land_mask array([[False, False, True, True, True, True, True, True, True], [False, False, True, True, True, True, True, True, True], [False, False, True, True, True, True, True, True, True], [False, False, True, True, True, True, True, True, True], [False, False, True, True, True, True, True, True, True], [False, False, True, True, True, True, True, True, True], [False, False, True, True, True, True, True, True, True], [False, False, True, True, True, True, True, True, True], [False, False, True, True, True, True, True, True, True]], dtype=bool) model_grid = {'lon': lon, 'lat': lat, 'land_mask': land_mask} fs = FloatSet(xlim=(0, 9), ylim=(-4, 5), model_grid=model_grid) fs.get_rectmesh()
np.__version__ '1.12.0' fs.ocean_bools array([False, False, True, True, True, True, True, True, True, False, True, True, True, True, True, True, True, True, False, True, True, True, True, True, True, True, True, False, True, True, True, True, True, True, True, True, False, True, True, True, True, True, True, True, True, False, True, True, True, True, True, True, True, True, False, True, True, True, True, True, True, True, True, False, False, True, True, True, True, True, True, True, False, False, True, True, True, True, True, True, True], dtype=bool)
np.__version__ '1.13.0' fs.ocean_bools array([False, True, True, True, True, True, True, True, True, False, True, True, True, True, True, True, True, True, False, True, True, True, True, True, True, True, True, False, True, True, True, True, True, True, True, True, False, True, True, True, True, True, True, True, True, False, True, True, True, True, True, True, True, True, False, True, True, True, True, True, True, True, True, False, True, True, True, True, True, True, True, True, False, True, True, True, True, True, True, True, True], dtype=bool)
cc: @rabernat, @nathanieltarshish
Huh, do you think it is related to the cKDTree? Do dist and neighbor_indices agree between versions?
cKDTree
dist
neighbor_indices
@geosciz can you tell us the scipy version on each environment?
@rabernat 0.19.0 for both.
0.19.0
A recent update of
numpy
package to version1.13.0
changes the behavior ofgenerators.py
. See an example as follows.cc: @rabernat, @nathanieltarshish