Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

REF No need for separate 32 and 64 bit C files.

  • Loading branch information...
commit aeb5daa60945ce932e53fdd33e544cd2ca343c1c 1 parent 4c62f7d
@kwgoodman authored
Showing with 62,834 additions and 625,972 deletions.
  1. +6 −8 Makefile
  2. 0  bottleneck/src/{move/64bit → func}/.gitignore
  3. +0 −1  bottleneck/src/func/32bit/.gitignore
  4. +0 −1  bottleneck/src/func/64bit/.gitignore
  5. +0 −332,082 bottleneck/src/func/64bit/func.c
  6. +37,771 −37,771 bottleneck/src/func/{32bit → }/func.c
  7. +1 −10 bottleneck/src/func/setup.py
  8. +2 −4 bottleneck/src/makepyx.py
  9. 0  bottleneck/src/move/{32bit → }/.gitignore
  10. +0 −231,022 bottleneck/src/move/64bit/move.c
  11. +25,009 −25,009 bottleneck/src/move/{32bit → }/move.c
  12. +1 −9 bottleneck/src/move/setup.py
  13. +1 −1  bottleneck/src/template/func/allnan.py
  14. +1 −1  bottleneck/src/template/func/anynan.py
  15. +1 −1  bottleneck/src/template/func/argpartsort.py
  16. +3 −3 bottleneck/src/template/func/func.py
  17. +1 −1  bottleneck/src/template/func/median.py
  18. +1 −1  bottleneck/src/template/func/nanargmax.py
  19. +1 −1  bottleneck/src/template/func/nanargmin.py
  20. +1 −1  bottleneck/src/template/func/nanmax.py
  21. +1 −1  bottleneck/src/template/func/nanmean.py
  22. +1 −1  bottleneck/src/template/func/nanmedian.py
  23. +1 −1  bottleneck/src/template/func/nanmin.py
  24. +1 −1  bottleneck/src/template/func/nanrankdata.py
  25. +1 −1  bottleneck/src/template/func/nanstd.py
  26. +1 −1  bottleneck/src/template/func/nansum.py
  27. +1 −1  bottleneck/src/template/func/nanvar.py
  28. +1 −1  bottleneck/src/template/func/nn.py
  29. +1 −1  bottleneck/src/template/func/partsort.py
  30. +1 −1  bottleneck/src/template/func/rankdata.py
  31. +1 −1  bottleneck/src/template/func/replace.py
  32. +1 −1  bottleneck/src/template/func/ss.py
  33. +3 −3 bottleneck/src/template/move/move.py
  34. +1 −1  bottleneck/src/template/move/move_max.py
  35. +1 −1  bottleneck/src/template/move/move_mean.py
  36. +2 −2 bottleneck/src/template/move/move_median.py
  37. +1 −1  bottleneck/src/template/move/move_min.py
  38. +1 −1  bottleneck/src/template/move/move_nanmax.py
  39. +1 −1  bottleneck/src/template/move/move_nanmean.py
  40. +1 −1  bottleneck/src/template/move/move_nanmin.py
  41. +1 −1  bottleneck/src/template/move/move_nanstd.py
  42. +1 −1  bottleneck/src/template/move/move_nansum.py
  43. +1 −1  bottleneck/src/template/move/move_std.py
  44. +1 −1  bottleneck/src/template/move/move_sum.py
  45. +5 −7 bottleneck/src/template/template.py
  46. +2 −11 setup.py
View
14 Makefile
@@ -23,10 +23,8 @@ pyx:
${PYTHON} -c "from bottleneck.src.makepyx import makepyx; makepyx()"
cfiles:
- cython ${srcdir}/func/32bit/func.pyx
- cython ${srcdir}/func/64bit/func.pyx
- cython ${srcdir}/move/32bit/move.pyx
- cython ${srcdir}/move/64bit/move.pyx
+ cython ${srcdir}/func/func.pyx
+ cython ${srcdir}/move/move.pyx
build: funcs moves
@@ -58,7 +56,7 @@ sdist: pyx
.PHONY: clean
clean:
rm -rf ${srcdir}/*~ ${srcdir}/*.so ${srcdir}/*.c ${srcdir}/*.o ${srcdir}/*.html ${srcdir}/build ${srcdir}/../*.so
- rm -rf ${srcdir}/func/32bit/*.c ${srcdir}/func/64bit/*.c
- rm -rf ${srcdir}/move/32bit/*.c ${srcdir}/move/64bit/*.c
- rm -rf ${srcdir}/func/32bit/*.pyx ${srcdir}/func/64bit/*.pyx
- rm -rf ${srcdir}/move/32bit/*.pyx ${srcdir}/move/64bit/*.pyx
+ rm -rf ${srcdir}/func/*.c
+ rm -rf ${srcdir}/move/*.c
+ rm -rf ${srcdir}/func/*.pyx
+ rm -rf ${srcdir}/move/*.pyx
View
0  bottleneck/src/move/64bit/.gitignore → bottleneck/src/func/.gitignore
File renamed without changes
View
1  bottleneck/src/func/32bit/.gitignore
@@ -1 +0,0 @@
-*.pyx
View
1  bottleneck/src/func/64bit/.gitignore
@@ -1 +0,0 @@
-*.pyx
View
332,082 bottleneck/src/func/64bit/func.c
0 additions, 332,082 deletions not shown
View
75,542 bottleneck/src/func/32bit/func.c → bottleneck/src/func/func.c
37,771 additions, 37,771 deletions not shown
View
11 bottleneck/src/func/setup.py
@@ -21,16 +21,8 @@
from Cython.Distutils import build_ext
import numpy as np
-# Is the default numpy int 32 or 64 bits?
-if np.int_ == np.int32:
- bits = '32'
-elif np.int_ == np.int64:
- bits = '64'
-else:
- raise ValueError("Your OS does not appear to be 32 or 64 bits.")
-
mod_dir = os.path.dirname(__file__)
-ext_modules = [Extension("func", [os.path.join(mod_dir, "%sbit/func.pyx") % bits],
+ext_modules = [Extension("func", [os.path.join(mod_dir, "func.pyx")],
include_dirs=[np.get_include()])]
setup(
@@ -40,4 +32,3 @@
)
os.rename("func.so", os.path.join(mod_dir, "../../func.so"))
-
View
6 bottleneck/src/makepyx.py
@@ -4,7 +4,5 @@
from bottleneck.src.template.move.move import movepyx
def makepyx():
- funcpyx(bits=32)
- movepyx(bits=32)
- funcpyx(bits=64)
- movepyx(bits=64)
+ funcpyx()
+ movepyx()
View
0  bottleneck/src/move/32bit/.gitignore → bottleneck/src/move/.gitignore
File renamed without changes
View
231,022 bottleneck/src/move/64bit/move.c
0 additions, 231,022 deletions not shown
View
50,018 bottleneck/src/move/32bit/move.c → bottleneck/src/move/move.c
25,009 additions, 25,009 deletions not shown
View
10 bottleneck/src/move/setup.py
@@ -21,16 +21,8 @@
from Cython.Distutils import build_ext
import numpy as np
-# Is the default numpy int 32 or 64 bits?
-if np.int_ == np.int32:
- bits = '32'
-elif np.int_ == np.int64:
- bits = '64'
-else:
- raise ValueError("Your OS does not appear to be 32 or 64 bits.")
-
mod_dir = os.path.dirname(__file__)
-ext_modules = [Extension("move", [os.path.join(mod_dir, "%sbit/move.pyx") % bits],
+ext_modules = [Extension("move", [os.path.join(mod_dir, "move.pyx")],
extra_compile_args=["-std=gnu89"],
include_dirs=[np.get_include()])]
View
2  bottleneck/src/template/func/allnan.py
@@ -163,7 +163,7 @@ def NAME_NDIMd_DTYPE_axisAXIS(np.ndarray[np.DTYPE_t, ndim=NDIM] a):
allnan['templates']['float_None'] = floats_None
allnan['templates']['int'] = ints
allnan['templates']['int_None'] = ints_None
-allnan['pyx_file'] = 'func/%sbit/allnan.pyx'
+allnan['pyx_file'] = 'func/allnan.pyx'
allnan['main'] = '''"allnan auto-generated from template"
View
2  bottleneck/src/template/func/anynan.py
@@ -146,7 +146,7 @@ def NAME_NDIMd_DTYPE_axisAXIS(np.ndarray[np.DTYPE_t, ndim=NDIM] a):
anynan['templates']['float_None'] = floats_None
anynan['templates']['int'] = ints
anynan['templates']['int_None'] = ints_None
-anynan['pyx_file'] = 'func/%sbit/anynan.pyx'
+anynan['pyx_file'] = 'func/anynan.pyx'
anynan['main'] = '''"anynan auto-generated from template"
View
2  bottleneck/src/template/func/argpartsort.py
@@ -151,7 +151,7 @@ def NAME_NDIMd_DTYPE_axisAXIS(np.ndarray[np.DTYPE_t, ndim=NDIM] a, int n):
argpartsort['templates'] = {}
argpartsort['templates']['float'] = floats
argpartsort['templates']['int'] = ints
-argpartsort['pyx_file'] = 'func/%sbit/argpartsort.pyx'
+argpartsort['pyx_file'] = 'func/argpartsort.pyx'
argpartsort['main'] = '''"argpartsort auto-generated from template"
# Select smallest k elements code used for inner loop of argpartsort method:
View
6 bottleneck/src/template/func/func.py
@@ -118,10 +118,10 @@
include "allnan.pyx"
"""
-def funcpyx(funcs=funcs, bits=None):
+def funcpyx(funcs=funcs):
for func in funcs:
- template(funcs[func], bits)
+ template(funcs[func])
template_path = os.path.dirname(tempmod.__file__)
- fid = open(os.path.join(template_path, '..', "func/%sbit/func.pyx") % str(bits), 'w')
+ fid = open(os.path.join(template_path, '..', "func/func.pyx"), 'w')
fid.write(header)
fid.close()
View
2  bottleneck/src/template/func/median.py
@@ -166,7 +166,7 @@ def NAME_NDIMd_DTYPE_axisAXIS(np.ndarray[np.DTYPE_t, ndim=NDIM] a):
median['templates'] = {}
median['templates']['float'] = floats
median['templates']['int'] = ints
-median['pyx_file'] = 'func/%sbit/median.pyx'
+median['pyx_file'] = 'func/median.pyx'
median['main'] = '''"median auto-generated from template"
# Select smallest k elements code used for inner loop of median method:
View
2  bottleneck/src/template/func/nanargmax.py
@@ -152,7 +152,7 @@ def NAME_NDIMd_DTYPE_axisAXIS(np.ndarray[np.DTYPE_t, ndim=NDIM] a):
nanargmax['templates'] = {}
nanargmax['templates']['float'] = floats
nanargmax['templates']['int'] = ints
-nanargmax['pyx_file'] = 'func/%sbit/nanargmax.pyx'
+nanargmax['pyx_file'] = 'func/nanargmax.pyx'
nanargmax['main'] = '''"nanargmax auto-generated from template"
View
2  bottleneck/src/template/func/nanargmin.py
@@ -152,7 +152,7 @@ def NAME_NDIMd_DTYPE_axisAXIS(np.ndarray[np.DTYPE_t, ndim=NDIM] a):
nanargmin['templates'] = {}
nanargmin['templates']['float'] = floats
nanargmin['templates']['int'] = ints
-nanargmin['pyx_file'] = 'func/%sbit/nanargmin.pyx'
+nanargmin['pyx_file'] = 'func/nanargmin.pyx'
nanargmin['main'] = '''"nanargmin auto-generated from template"
View
2  bottleneck/src/template/func/nanmax.py
@@ -223,7 +223,7 @@ def NAME_NDIMd_DTYPE_axisAXIS(np.ndarray[np.DTYPE_t, ndim=NDIM] a):
nanmax['templates']['float_None'] = floats_None
nanmax['templates']['int'] = ints
nanmax['templates']['int_None'] = ints_None
-nanmax['pyx_file'] = 'func/%sbit/nanmax.pyx'
+nanmax['pyx_file'] = 'func/nanmax.pyx'
nanmax['main'] = '''"nanmax auto-generated from template"
View
2  bottleneck/src/template/func/nanmean.py
@@ -196,7 +196,7 @@ def NAME_NDIMd_DTYPE_axisAXIS(np.ndarray[np.DTYPE_t, ndim=NDIM] a):
nanmean['templates']['float_None'] = floats_None
nanmean['templates']['int'] = ints
nanmean['templates']['int_None'] = ints_None
-nanmean['pyx_file'] = 'func/%sbit/nanmean.pyx'
+nanmean['pyx_file'] = 'func/nanmean.pyx'
nanmean['main'] = '''"nanmean auto-generated from template"
View
2  bottleneck/src/template/func/nanmedian.py
@@ -223,7 +223,7 @@ def NAME_NDIMd_DTYPE_axisAXIS(np.ndarray[np.DTYPE_t, ndim=NDIM] a):
nanmedian['templates'] = {}
nanmedian['templates']['float'] = floats
nanmedian['templates']['int'] = ints
-nanmedian['pyx_file'] = 'func/%sbit/nanmedian.pyx'
+nanmedian['pyx_file'] = 'func/nanmedian.pyx'
nanmedian['main'] = '''"nanmedian auto-generated from template"
# Select smallest k elements code used for inner loop of median method:
View
2  bottleneck/src/template/func/nanmin.py
@@ -223,7 +223,7 @@ def NAME_NDIMd_DTYPE_axisAXIS(np.ndarray[np.DTYPE_t, ndim=NDIM] a):
nanmin['templates']['float_None'] = floats_None
nanmin['templates']['int'] = ints
nanmin['templates']['int_None'] = ints_None
-nanmin['pyx_file'] = 'func/%sbit/nanmin.pyx'
+nanmin['pyx_file'] = 'func/nanmin.pyx'
nanmin['main'] = '''"nanmin auto-generated from template"
View
2  bottleneck/src/template/func/nanrankdata.py
@@ -166,7 +166,7 @@ def NAME_NDIMd_DTYPE_axisAXIS(np.ndarray[np.DTYPE_t, ndim=NDIM] a):
nanrankdata['templates'] = {}
nanrankdata['templates']['float'] = floats
nanrankdata['templates']['int'] = ints
-nanrankdata['pyx_file'] = 'func/%sbit/nanrankdata.pyx'
+nanrankdata['pyx_file'] = 'func/nanrankdata.pyx'
nanrankdata['main'] = '''"nanrankdata auto-generated from template"
View
2  bottleneck/src/template/func/nanstd.py
@@ -278,7 +278,7 @@ def NAME_NDIMd_DTYPE_axisAXIS(np.ndarray[np.DTYPE_t, ndim=NDIM] a, int ddof):
nanstd['templates']['float_None'] = floats_None
nanstd['templates']['int'] = ints
nanstd['templates']['int_None'] = ints_None
-nanstd['pyx_file'] = 'func/%sbit/nanstd.pyx'
+nanstd['pyx_file'] = 'func/nanstd.pyx'
nanstd['main'] = '''"nanstd auto-generated from template"
View
2  bottleneck/src/template/func/nansum.py
@@ -181,7 +181,7 @@ def NAME_NDIMd_DTYPE_axisAXIS(np.ndarray[np.DTYPE_t, ndim=NDIM] a):
nansum['templates']['float_None'] = floats_None
nansum['templates']['int'] = ints
nansum['templates']['int_None'] = ints_None
-nansum['pyx_file'] = 'func/%sbit/nansum.pyx'
+nansum['pyx_file'] = 'func/nansum.pyx'
nansum['main'] = '''"nansum auto-generated from template"
View
2  bottleneck/src/template/func/nanvar.py
@@ -278,7 +278,7 @@ def NAME_NDIMd_DTYPE_axisAXIS(np.ndarray[np.DTYPE_t, ndim=NDIM] a, int ddof):
nanvar['templates']['float_None'] = floats_None
nanvar['templates']['int'] = ints
nanvar['templates']['int_None'] = ints_None
-nanvar['pyx_file'] = 'func/%sbit/nanvar.pyx'
+nanvar['pyx_file'] = 'func/nanvar.pyx'
nanvar['main'] = '''"nanvar auto-generated from template"
View
2  bottleneck/src/template/func/nn.py
@@ -72,7 +72,7 @@ def NAME_NDIMd_DTYPE_axisAXIS(np.ndarray[np.DTYPE_t, ndim=2] a,
nn['templates'] = {}
nn['templates']['float'] = floats
nn['templates']['int'] = ints
-nn['pyx_file'] = 'func/%sbit/nn.pyx'
+nn['pyx_file'] = 'func/nn.pyx'
nn['main'] = '''"nn auto-generated from template"
View
2  bottleneck/src/template/func/partsort.py
@@ -133,7 +133,7 @@ def NAME_NDIMd_DTYPE_axisAXIS(np.ndarray[np.DTYPE_t, ndim=NDIM] a, int n):
partsort['templates'] = {}
partsort['templates']['float'] = floats
partsort['templates']['int'] = ints
-partsort['pyx_file'] = 'func/%sbit/partsort.pyx'
+partsort['pyx_file'] = 'func/partsort.pyx'
partsort['main'] = '''"partsort auto-generated from template"
# Select smallest k elements code used for inner loop of partsort method:
View
2  bottleneck/src/template/func/rankdata.py
@@ -144,7 +144,7 @@ def NAME_NDIMd_DTYPE_axisAXIS(np.ndarray[np.DTYPE_t, ndim=NDIM] a):
rankdata['templates'] = {}
rankdata['templates']['float'] = floats
rankdata['templates']['int'] = ints
-rankdata['pyx_file'] = 'func/%sbit/rankdata.pyx'
+rankdata['pyx_file'] = 'func/rankdata.pyx'
rankdata['main'] = '''"rankdata auto-generated from template"
View
2  bottleneck/src/template/func/replace.py
@@ -149,7 +149,7 @@ def NAME_NDIMd_DTYPE_axisAXIS(np.ndarray[np.DTYPE_t, ndim=NDIM] a,
replace['templates'] = {}
replace['templates']['float_None'] = floats
replace['templates']['int_None'] = ints
-replace['pyx_file'] = 'func/%sbit/replace.pyx'
+replace['pyx_file'] = 'func/replace.pyx'
replace['main'] = '''"replace auto-generated from template"
View
2  bottleneck/src/template/func/ss.py
@@ -106,7 +106,7 @@ def NAME_NDIMd_DTYPE_axisAXIS(np.ndarray[np.DTYPE_t, ndim=NDIM] a):
ss['templates']['float_None'] = floats_None
ss['templates']['int'] = ints
ss['templates']['int_None'] = ints_None
-ss['pyx_file'] = 'func/%sbit/ss.pyx'
+ss['pyx_file'] = 'func/ss.pyx'
ss['main'] = '''"ss auto-generated from template"
View
6 bottleneck/src/template/move/move.py
@@ -82,10 +82,10 @@
include "move_nanmax.pyx"
"""
-def movepyx(funcs=funcs, bits=None):
+def movepyx(funcs=funcs):
for func in funcs:
- template(funcs[func], bits)
+ template(funcs[func])
template_path = os.path.dirname(tempmod.__file__)
- fid = open(os.path.join(template_path, '..', "move/%sbit/move.pyx") % str(bits), 'w')
+ fid = open(os.path.join(template_path, '..', "move/move.pyx"), 'w')
fid.write(header)
fid.close()
View
2  bottleneck/src/template/move/move_max.py
@@ -230,7 +230,7 @@ def NAME_NDIMd_DTYPE_axisAXIS(np.ndarray[np.DTYPE_t, ndim=NDIM] a, int window):
move_max['templates'] = {}
move_max['templates']['float'] = floats
move_max['templates']['int'] = ints
-move_max['pyx_file'] = 'move/%sbit/move_max.pyx'
+move_max['pyx_file'] = 'move/move_max.pyx'
move_max['main'] = '''"move_max auto-generated from template"
View
2  bottleneck/src/template/move/move_mean.py
@@ -229,7 +229,7 @@ def NAME_NDIMd_DTYPE_axisAXIS(np.ndarray[np.DTYPE_t, ndim=NDIM] a,
move_mean['templates'] = {}
move_mean['templates']['float'] = floats
move_mean['templates']['int'] = ints
-move_mean['pyx_file'] = 'move/%sbit/move_mean.pyx'
+move_mean['pyx_file'] = 'move/move_mean.pyx'
move_mean['main'] = '''"move_mean auto-generated from template"
View
4 bottleneck/src/template/move/move_median.py
@@ -120,11 +120,11 @@ def NAME_NDIMd_DTYPE_axisAXIS(np.ndarray[np.DTYPE_t, ndim=NDIM] a,
move_median['templates'] = {}
move_median['templates']['float'] = floats
move_median['templates']['int'] = ints
-move_median['pyx_file'] = 'move/%sbit/move_median.pyx'
+move_median['pyx_file'] = 'move/move_median.pyx'
move_median['main'] = '''"move_median auto-generated from template"
-cdef extern from "../csrc/move_median.c":
+cdef extern from "csrc/move_median.c":
struct _mm_node:
np.npy_uint32 small
np.npy_uint64 idx
View
2  bottleneck/src/template/move/move_min.py
@@ -230,7 +230,7 @@ def NAME_NDIMd_DTYPE_axisAXIS(np.ndarray[np.DTYPE_t, ndim=NDIM] a, int window):
move_min['templates'] = {}
move_min['templates']['float'] = floats
move_min['templates']['int'] = ints
-move_min['pyx_file'] = 'move/%sbit/move_min.pyx'
+move_min['pyx_file'] = 'move/move_min.pyx'
move_min['main'] = '''"move_min auto-generated from template"
View
2  bottleneck/src/template/move/move_nanmax.py
@@ -229,7 +229,7 @@ def NAME_NDIMd_DTYPE_axisAXIS(np.ndarray[np.DTYPE_t, ndim=NDIM] a, int window):
move_nanmax['templates'] = {}
move_nanmax['templates']['float'] = floats
move_nanmax['templates']['int'] = ints
-move_nanmax['pyx_file'] = 'move/%sbit/move_nanmax.pyx'
+move_nanmax['pyx_file'] = 'move/move_nanmax.pyx'
move_nanmax['main'] = '''"move_nanmax auto-generated from template"
View
2  bottleneck/src/template/move/move_nanmean.py
@@ -166,7 +166,7 @@ def NAME_NDIMd_DTYPE_axisAXIS(np.ndarray[np.DTYPE_t, ndim=NDIM] a,
move_nanmean['templates'] = {}
move_nanmean['templates']['float'] = floats
move_nanmean['templates']['int'] = ints
-move_nanmean['pyx_file'] = 'move/%sbit/move_nanmean.pyx'
+move_nanmean['pyx_file'] = 'move/move_nanmean.pyx'
move_nanmean['main'] = '''"move_nanmean auto-generated from template"
View
2  bottleneck/src/template/move/move_nanmin.py
@@ -229,7 +229,7 @@ def NAME_NDIMd_DTYPE_axisAXIS(np.ndarray[np.DTYPE_t, ndim=NDIM] a, int window):
move_nanmin['templates'] = {}
move_nanmin['templates']['float'] = floats
move_nanmin['templates']['int'] = ints
-move_nanmin['pyx_file'] = 'move/%sbit/move_nanmin.pyx'
+move_nanmin['pyx_file'] = 'move/move_nanmin.pyx'
move_nanmin['main'] = '''"move_nanmin auto-generated from template"
View
2  bottleneck/src/template/move/move_nanstd.py
@@ -204,7 +204,7 @@ def NAME_NDIMd_DTYPE_axisAXIS(np.ndarray[np.DTYPE_t, ndim=NDIM] a,
move_nanstd['templates'] = {}
move_nanstd['templates']['float'] = floats
move_nanstd['templates']['int'] = ints
-move_nanstd['pyx_file'] = 'move/%sbit/move_nanstd.pyx'
+move_nanstd['pyx_file'] = 'move/move_nanstd.pyx'
move_nanstd['main'] = '''"move_nanstd auto-generated from template"
View
2  bottleneck/src/template/move/move_nansum.py
@@ -166,7 +166,7 @@ def NAME_NDIMd_DTYPE_axisAXIS(np.ndarray[np.DTYPE_t, ndim=NDIM] a,
move_nansum['templates'] = {}
move_nansum['templates']['float'] = floats
move_nansum['templates']['int'] = ints
-move_nansum['pyx_file'] = 'move/%sbit/move_nansum.pyx'
+move_nansum['pyx_file'] = 'move/move_nansum.pyx'
move_nansum['main'] = '''"move_nansum auto-generated from template"
View
2  bottleneck/src/template/move/move_std.py
@@ -294,7 +294,7 @@ def NAME_NDIMd_DTYPE_axisAXIS(np.ndarray[np.DTYPE_t, ndim=NDIM] a,
move_std['templates'] = {}
move_std['templates']['float'] = floats
move_std['templates']['int'] = ints
-move_std['pyx_file'] = 'move/%sbit/move_std.pyx'
+move_std['pyx_file'] = 'move/move_std.pyx'
move_std['main'] = '''"move_std auto-generated from template"
View
2  bottleneck/src/template/move/move_sum.py
@@ -229,7 +229,7 @@ def NAME_NDIMd_DTYPE_axisAXIS(np.ndarray[np.DTYPE_t, ndim=NDIM] a,
move_sum['templates'] = {}
move_sum['templates']['float'] = floats
move_sum['templates']['int'] = ints
-move_sum['pyx_file'] = 'move/%sbit/move_sum.pyx'
+move_sum['pyx_file'] = 'move/move_sum.pyx'
move_sum['main'] = '''"move_sum auto-generated from template"
View
12 bottleneck/src/template/template.py
@@ -2,10 +2,9 @@
import os.path
-def template(func, bits):
+def template(func):
"Convert template dictionary `func` to a pyx file."
codes = []
- codes.append("# %s bit version\n" % str(bits))
codes.append(func['main'])
select = Selector(func['name'])
for key in func['templates']:
@@ -19,8 +18,7 @@ def template(func, bits):
reuse_non_nan_func=f['reuse_non_nan_func'],
is_reducing_function=func['is_reducing_function'],
cdef_output=func['cdef_output'],
- select=select,
- bits=bits)
+ select=select)
codes.append(code)
codes.append('\n' + str(select))
if 'slow' in func:
@@ -33,13 +31,13 @@ def template(func, bits):
codes.append(code2)
codes.append(code1)
modpath = os.path.dirname(__file__)
- fid = open(os.path.join(modpath, '..', func['pyx_file']) % str(bits), 'w')
+ fid = open(os.path.join(modpath, '..', func['pyx_file']), 'w')
fid.write(''.join(codes))
fid.close()
def subtemplate(name, top, loop, axisNone, dtypes, force_output_dtype,
- reuse_non_nan_func, is_reducing_function, cdef_output, select,
- bits):
+ reuse_non_nan_func, is_reducing_function, cdef_output,
+ select):
"Assemble template"
ndims = sorted(loop.keys())
funcs = []
View
13 setup.py
@@ -64,15 +64,6 @@
PACKAGE_DATA = {'bottleneck': ['LICENSE']}
REQUIRES = ["numpy"]
-
-# Is the default numpy int 32 or 64 bits?
-if np.int_ == np.int32:
- bits = '32'
-elif np.int_ == np.int64:
- bits = '64'
-else:
- raise ValueError("Your OS does not appear to be 32 or 64 bits.")
-
setup(name=NAME,
maintainer=MAINTAINER,
maintainer_email=MAINTAINER_EMAIL,
@@ -91,9 +82,9 @@
requires=REQUIRES,
ext_package='bottleneck',
ext_modules=[Extension("func",
- sources=["bottleneck/src/func/%sbit/func.c" % bits],
+ sources=["bottleneck/src/func/func.c"],
include_dirs=[np.get_include()]),
Extension("move",
- sources=["bottleneck/src/move/%sbit/move.c" % bits],
+ sources=["bottleneck/src/move/move.c"],
include_dirs=[np.get_include()])]
)
Please sign in to comment.
Something went wrong with that request. Please try again.