Skip to content

Commit

Permalink
Remove FutureWarning by using tuple for indices
Browse files Browse the repository at this point in the history
Multi-dimensional indices will need to use a tuple in the future,
so fix this now and remove the warning.
  • Loading branch information
hunse committed Mar 4, 2020
1 parent b7f0e14 commit 4c11b80
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nengo_dl/converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -1111,8 +1111,8 @@ def convert(self, node_id):
broadcast_bias = np.zeros(self.output_shape(node_id))
for i in range(idxs.shape[axis]):
slices[axis] = i
broadcast_scale[slices] = scale[i]
broadcast_bias[slices] = bias[i]
broadcast_scale[tuple(slices)] = scale[i]
broadcast_bias[tuple(slices)] = bias[i]
broadcast_scale = np.ravel(broadcast_scale)
broadcast_bias = np.ravel(broadcast_bias)

Expand Down

0 comments on commit 4c11b80

Please sign in to comment.