Skip to content

Commit

Permalink
Fix tests for older Numpy versions.
Browse files Browse the repository at this point in the history
  • Loading branch information
jgosmann committed Feb 7, 2018
1 parent 369018f commit a2d0cf3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nengo_spa/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def sp_close(
actual = data[(skip < t) & (t <= skip + duration)]
expected = target_sp
if normalized:
actual /= np.linalg.norm(actual, axis=1, keepdims=True)
actual /= np.expand_dims(np.linalg.norm(actual, axis=1), 1)
expected = expected.normalized()
return np.all(np.sqrt(np.sum(
np.square(actual - expected.v), axis=1)) < atol)

0 comments on commit a2d0cf3

Please sign in to comment.