summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
Diffstat (limited to 'numpy')
-rw-r--r--numpy/build_utils/waf.py14
-rw-r--r--numpy/core/bento.info5
-rw-r--r--numpy/core/bscript5
-rw-r--r--numpy/random/tests/test_random.py8
4 files changed, 20 insertions, 12 deletions
diff --git a/numpy/build_utils/waf.py b/numpy/build_utils/waf.py
index 051cf27e0..ab49ecea9 100644
--- a/numpy/build_utils/waf.py
+++ b/numpy/build_utils/waf.py
@@ -412,15 +412,15 @@ def check_ldouble_representation(conf, **kw):
def post_check(self, *k, **kw):
"set the variables after a test was run successfully"
- is_success = 0
+ is_success = False
if kw['execute']:
if kw['success'] is not None:
- is_success = kw['success']
+ if kw.get('define_ret', False):
+ is_success = kw['success']
+ else:
+ is_success = (kw['success'] == 0)
else:
- if kw["success"] == 0:
- is_success = 1
- else:
- is_success = 0
+ is_success = (kw['success'] == 0)
def define_or_stuff():
nm = kw['define_name']
@@ -453,7 +453,7 @@ def post_check(self, *k, **kw):
if isinstance(val, str):
val = val.rstrip(os.path.sep)
self.env.append_unique(k + '_' + kw['uselib_store'], val)
- return is_success
+ return is_success
@waflib.Configure.conf
def define_with_comment(conf, define, value, comment=None, quote=True):
diff --git a/numpy/core/bento.info b/numpy/core/bento.info
index bf8ae3a81..9c8476eee 100644
--- a/numpy/core/bento.info
+++ b/numpy/core/bento.info
@@ -1,7 +1,7 @@
HookFile: bscript
Library:
- CompiledLibrary: npymath
+ CompiledLibrary: lib/npymath
Sources:
src/npymath/_signbit.c,
src/npymath/ieee754.c.src,
@@ -28,3 +28,6 @@ Library:
Extension: scalarmath
Sources:
src/scalarmathmodule.c.src
+ Extension: _dotblas
+ Sources:
+ blasdot/_dotblas.c
diff --git a/numpy/core/bscript b/numpy/core/bscript
index 1ded8eff3..f52c8c013 100644
--- a/numpy/core/bscript
+++ b/numpy/core/bscript
@@ -411,8 +411,7 @@ def pre_build(context):
numpyconfig_h = context.local_node.declare(os.path.join("include", "numpy", "_numpyconfig.h"))
context.register_outputs("numpy_gen_headers", "numpyconfig", [numpyconfig_h])
- context.tweak_library("npymath",
- includes=["src/private", "src/npymath", "include"])
+ context.tweak_library("lib/npymath", includes=["src/private", "src/npymath", "include"])
context.tweak_library("npysort",
includes=[".", "src/private", "src/npysort"],
@@ -507,5 +506,5 @@ def pre_build(context):
def build_dotblas(extension):
if bld.env.HAS_CBLAS:
- return context.default_builder(extension, use="CBLAS")
+ return context.default_builder(extension, use="CBLAS", includes=["src/private"])
context.register_builder("_dotblas", build_dotblas)
diff --git a/numpy/random/tests/test_random.py b/numpy/random/tests/test_random.py
index 7d9163e61..ee40cce69 100644
--- a/numpy/random/tests/test_random.py
+++ b/numpy/random/tests/test_random.py
@@ -360,7 +360,13 @@ class TestRandomDist(TestCase):
desired = np.array([[ 2.46852460439034849e+03, 1.41286880810518346e+03],
[ 5.28287797029485181e+07, 6.57720981047328785e+07],
[ 1.40840323350391515e+02, 1.98390255135251704e+05]])
- np.testing.assert_array_almost_equal(actual, desired, decimal=15)
+ # For some reason on 32-bit x86 Ubuntu 12.10 the [1, 0] entry in this
+ # matrix differs by 24 nulps. Discussion:
+ # http://mail.scipy.org/pipermail/numpy-discussion/2012-September/063801.html
+ # Consensus is that this is probably some gcc quirk that affects
+ # rounding but not in any important way, so we just use a looser
+ # tolerance on this test:
+ np.testing.assert_array_almost_equal_nulp(actual, desired, nulp=30)
def test_poisson(self):
np.random.seed(self.seed)