diff --git a/test/space/ntuples_test.py b/test/space/ntuples_test.py
index <HASH>..<HASH> 100644
--- a/test/space/ntuples_test.py
+++ b/test/space/ntuples_test.py
@@ -20,7 +20,7 @@
 from __future__ import print_function, division, absolute_import
 from future import standard_library
 standard_library.install_aliases()
-from builtins import range, str
+from builtins import range
 
 # External module imports
 from math import ceil
@@ -82,7 +82,7 @@ def _pos_array(fn):
 
 def _sparse_matrix(fn):
     """Create a sparse positive definite Hermitian matrix for `fn`."""
-    nnz = np.random.randint(0, int(ceil(fn.size ** 2 / 2)))
+    nnz = np.random.randint(0, int(ceil(fn.size / 2)))
     coo_r = np.random.randint(0, fn.size, size=nnz)
     coo_c = np.random.randint(0, fn.size, size=nnz)
     if np.issubdtype(fn.dtype, np.floating):
TST: fix failing matrix norm test