Skip to content

Commit cdcb2ee

Browse files
committed
Fixed shape issue
1 parent a5a347c commit cdcb2ee

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

python/extpar_art_to_buffer.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030

3131
def get_neighbor_index(index, hlat, hlon, idxs, ones, balltree):
32-
points = np.column_stack((hlat, hlon[index] * ones))
32+
points = np.column_stack((hlat[index] * ones, hlon))
3333
idxs[index, :] = balltree.query(points, k=1)[1].squeeze()
3434

3535

@@ -203,9 +203,9 @@ def get_fraction_per_soil_type(soil_id):
203203
lat_lon_array = np.column_stack((lats.ravel(), lons.ravel()))
204204
balltree = BallTree(lat_lon_array, metric="haversine", leaf_size=3)
205205

206-
ones = np.ones((raw_lat.size))
206+
ones = np.ones((raw_lon.size))
207207

208-
nrows = np.arange(raw_lon.size)
208+
nrows = np.arange(raw_lat.size)
209209
Parallel(n_jobs=omp, max_nbytes='100M', mmap_mode='w+')(delayed(
210210
get_neighbor_index)(i, raw_lat, raw_lon, neighbor_ids, ones, balltree)
211211
for i in tqdm(nrows))

0 commit comments

Comments
 (0)