Skip to content

Commit eb9241e

Browse files
authored
Update WrightTools/data/_join.py
1 parent d432dbc commit eb9241e

1 file changed

Lines changed: 3 additions & 9 deletions

File tree

WrightTools/data/_join.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -209,15 +209,9 @@ def combine(data, out, item_name, new_idx, transpose, slice_):
209209
vals[:] = 0
210210
# Use advanced indexing to populate vals, a temporary array with same shape as out
211211
valid_index = tuple(wt_kit.valid_index(new_idx, new.shape))
212-
# temp patch--numpy now doesn't let you write array element with sequence of length 1
213-
try:
214-
vals[valid_index] = old[:].transpose(transpose)[slice_]
215-
except ValueError as e:
216-
if all(
217-
[isinstance(i, int) for i in valid_index]
218-
): # temp patch: setting element to array of size 1 used to work
219-
valid_index = [[i] for i in valid_index]
220-
vals[valid_index] = old[:].transpose(transpose)[slice_]
212+
if all([isinstance(i, int) for i in valid_index]): # patched: numpy now doesn't let you set element array of size 1
213+
valid_index = [[i] for i in valid_index]
214+
vals[valid_index] = old[:].transpose(transpose)[slice_]
221215

222216
# Overlap methods are accomplished by adding the existing array with the one added
223217
# for this particular data. Thus locations which should be set, but conflict by

0 commit comments

Comments
 (0)