summaryrefslogtreecommitdiff
path: root/numpy/core/setup.py
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2016-02-15 12:49:02 -0700
committerCharles Harris <charlesr.harris@gmail.com>2016-02-18 21:31:05 -0700
commit8556c5dcf623efa57d037b0b9685a81a896010d5 (patch)
tree3c0b683d6826587fc847889993c6510a3745a138 /numpy/core/setup.py
parent25c23f1d956104a072a95355ffaa7a38b53710b7 (diff)
downloadnumpy-8556c5dcf623efa57d037b0b9685a81a896010d5.tar.gz
ENH: Make numpy floating scalars consistent with Python divmod.
The following numpy scalar floating functions are reimplemented using the npy_divmod function. - remainder ('%') - floor_division ('//') - divmod Note that numpy scalars warn on zero division rather than raise. divmod example, Python floats In [1]: a = 78 * 6e-8 In [2]: b = 6e-8 In [3]: divmod(a, b) Out[3]: (77.0, 5.999999999999965e-08) Before this commit numpy float64 gave In [4]: divmod(float64(a), float64(b)) Out[4]: (78.0, 0.0) After this commit numpy float64 gives In [4]: divmod(float64(a), float64(b)) Out[4]: (77.0, 5.9999999999999651e-08)
Diffstat (limited to 'numpy/core/setup.py')
-rw-r--r--numpy/core/setup.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/numpy/core/setup.py b/numpy/core/setup.py
index 2e9e277af..593b21f6d 100644
--- a/numpy/core/setup.py
+++ b/numpy/core/setup.py
@@ -896,6 +896,8 @@ def configuration(parent_package='',top_path=None):
umath_deps = [
generate_umath_py,
+ join('include', 'numpy', 'npy_math.h'),
+ join('include', 'numpy', 'halffloat.h'),
join('src', 'multiarray', 'common.h'),
join('src', 'private', 'templ_common.h.src'),
join('src', 'umath', 'simd.inc.src'),