Description: Fix test failure with NumPy 1.12
Forwarded: no
Bug-Debian: https://bugs.debian.org/849232
Author: Graham Inggs <ginggs@debian.org>
Last-Update: 2016-12-31
--- a/brainstorm/tests/test_handler_operations.py
+++ b/brainstorm/tests/test_handler_operations.py
@@ -81,8 +81,8 @@
                                      kernel_shape[1]) / stride[1] + 1
 
                                 outputs = np.zeros((nr_images,
-                                                    output_height,
-                                                    output_width,
+                                                    int(output_height),
+                                                    int(output_width),
                                                     nr_filters), dtype=dtype)
                                 true_outputs = np.zeros_like(outputs)
 
--- a/brainstorm/tests/test_weight_modifiers.py
+++ b/brainstorm/tests/test_weight_modifiers.py
@@ -17,7 +17,7 @@
 def test_limit_incoming_weights_squared():
     for orig in (np.random.rand(4, 5), np.random.randn(3, 5, 4, 6)):
         for limit in [0.00001, 1, 10, 10000]:
-            x = orig.reshape(orig.shape[0], orig.size / orig.shape[0]).copy()
+            x = orig.reshape(orig.shape[0], int(orig.size / orig.shape[0])).copy()
             divisor = (x * x).sum(axis=1, keepdims=True) ** 0.5 / limit
             divisor[divisor < 1] = 1
             out = (x / divisor).reshape(orig.shape)
