summaryrefslogtreecommitdiff
path: root/numpy/core
diff options
context:
space:
mode:
authorTravis Oliphant <oliphant@enthought.com>2006-01-04 17:47:13 +0000
committerTravis Oliphant <oliphant@enthought.com>2006-01-04 17:47:13 +0000
commitc14d4fe25cb5cd482369734dd487ac8f376851c9 (patch)
treeebd088e5ccb2ca8162b53f1c443c6de303e9abe7 /numpy/core
parent3496a3cda8ea70253a76ed17c0af261f2d645fe2 (diff)
downloadnumpy-c14d4fe25cb5cd482369734dd487ac8f376851c9.tar.gz
Change most setup.py files
Diffstat (limited to 'numpy/core')
-rw-r--r--numpy/core/setup.py27
-rw-r--r--numpy/core/tests/test_ufunclike.py63
2 files changed, 10 insertions, 80 deletions
diff --git a/numpy/core/setup.py b/numpy/core/setup.py
index 5f0e0fa94..381bb3753 100644
--- a/numpy/core/setup.py
+++ b/numpy/core/setup.py
@@ -6,10 +6,10 @@ from glob import glob
from distutils.dep_util import newer,newer_group
def configuration(parent_package='',top_path=None):
- from scipy.distutils.misc_util import Configuration,dot_join
- from scipy.distutils.system_info import get_info
+ from numpy.distutils.misc_util import Configuration,dot_join
+ from numpy.distutils.system_info import get_info
- config = Configuration('base',parent_package,top_path)
+ config = Configuration('core',parent_package,top_path)
local_dir = config.local_path
codegen_dir = join(local_dir,'code_generators')
@@ -19,7 +19,7 @@ def configuration(parent_package='',top_path=None):
open(generate_umath_py,'U'),generate_umath_py,
('.py','U',1))
- header_dir = join(*(config.name.split('.')+['include','scipy']))
+ header_dir = join(*(config.name.split('.')+['include','numpy']))
def generate_config_h(ext, build_dir):
target = join(build_dir,'config.h')
@@ -90,8 +90,8 @@ def configuration(parent_package='',top_path=None):
ext.libraries.extend(mathlibs)
incl_dir = os.path.dirname(target)
- if incl_dir not in config.scipy_include_dirs:
- config.scipy_include_dirs.append(incl_dir)
+ if incl_dir not in config.numpy_include_dirs:
+ config.numpy_include_dirs.append(incl_dir)
config.add_data_files((header_dir,target))
return target
@@ -127,16 +127,16 @@ def configuration(parent_package='',top_path=None):
f.close()
return []
- config.add_data_files(join('include','scipy','*.h'))
+ config.add_data_files(join('include','numpy','*.h'))
config.add_include_dirs('src')
- config.scipy_include_dirs.extend(config.paths('include'))
+ config.numpy_include_dirs.extend(config.paths('include'))
deps = [join('src','arrayobject.c'),
join('src','arraymethods.c'),
join('src','scalartypes.inc.src'),
join('src','arraytypes.inc.src'),
- join('include','scipy','*object.h'),
+ join('include','numpy','*object.h'),
join(codegen_dir,'genapi.py'),
join(codegen_dir,'*.txt')
]
@@ -167,13 +167,6 @@ def configuration(parent_package='',top_path=None):
]+deps,
)
- config.add_extension('_compiled_base',
- sources=[join('src','_compiled_base.c'),
- generate_config_h,
- generate_array_api,
- ],
- )
-
config.add_extension('_sort',
sources=[join('src','_sortmodule.c.src'),
generate_config_h,
@@ -280,5 +273,5 @@ int main(int argc, char **argv)
return testcode
if __name__=='__main__':
- from scipy.distutils.core import setup
+ from numpy.distutils.core import setup
setup(**configuration(top_path='').todict())
diff --git a/numpy/core/tests/test_ufunclike.py b/numpy/core/tests/test_ufunclike.py
deleted file mode 100644
index ca06140c7..000000000
--- a/numpy/core/tests/test_ufunclike.py
+++ /dev/null
@@ -1,63 +0,0 @@
-"""
->>> import scipy.base as nx
->>> import scipy.base.ufunclike as U
-
-Test fix:
->>> a = nx.array([[1.0, 1.1, 1.5, 1.8], [-1.0, -1.1, -1.5, -1.8]])
->>> U.fix(a)
-array([[ 1., 1., 1., 1.],
- [ 0., -1., -1., -1.]])
->>> y = nx.zeros(a.shape, float)
->>> U.fix(a, y)
-array([[ 1., 1., 1., 1.],
- [ 0., -1., -1., -1.]])
->>> y
-array([[ 1., 1., 1., 1.],
- [ 0., -1., -1., -1.]])
-
-Test isposinf, isneginf, sign
->>> a = nx.array([nx.Inf, -nx.Inf, nx.NaN, 0.0, 3.0, -3.0])
->>> U.isposinf(a)
-array([True, False, False, False, False, False], dtype=bool)
->>> U.isneginf(a)
-array([False, True, False, False, False, False], dtype=bool)
->>> U.sign(a)
-array([ 1, -1, 0, 0, 1, -1])
-
-Same thing with an output array:
->>> y = nx.zeros(a.shape, bool)
->>> U.isposinf(a, y)
-array([True, False, False, False, False, False], dtype=bool)
->>> y
-array([True, False, False, False, False, False], dtype=bool)
->>> U.isneginf(a, y)
-array([False, True, False, False, False, False], dtype=bool)
->>> y
-array([False, True, False, False, False, False], dtype=bool)
->>> U.sign(a, y)
-array([True, True, False, False, True, True], dtype=bool)
->>> y
-array([True, True, False, False, True, True], dtype=bool)
-
-Now log2:
->>> a = nx.array([4.5, 2.3, 6.5])
->>> U.log2(a)
-array([ 2.169925 , 1.20163386, 2.70043972])
->>> 2**_
-array([ 4.5, 2.3, 6.5])
->>> y = nx.zeros(a.shape, float)
->>> U.log2(a, y)
-array([ 2.169925 , 1.20163386, 2.70043972])
->>> y
-array([ 2.169925 , 1.20163386, 2.70043972])
-
-"""
-
-from scipy.testing import *
-
-import doctest
-def test_suite(level=1):
- return doctest.DocTestSuite()
-
-if __name__ == "__main__":
- ScipyTest().run()