summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTravis Oliphant <oliphant@enthought.com>2006-02-09 20:50:33 +0000
committerTravis Oliphant <oliphant@enthought.com>2006-02-09 20:50:33 +0000
commitd99b73b34ffc1778e9ff2423b56a8994d0e9be78 (patch)
tree794ae0e7e19c23db7dec1d4fc534311af708225e
parentf5209cbd46b7d6ad0a0960630189670adb2b3ccb (diff)
downloadnumpy-d99b73b34ffc1778e9ff2423b56a8994d0e9be78.tar.gz
Change accuracy of fill and more _WIN32 fixes.
-rw-r--r--numpy/core/setup.py5
-rw-r--r--numpy/core/src/arraytypes.inc.src24
-rw-r--r--numpy/distutils/system_info.py3
-rw-r--r--numpy/random/setup.py1
4 files changed, 12 insertions, 21 deletions
diff --git a/numpy/core/setup.py b/numpy/core/setup.py
index c054f7d8e..27c06ecbf 100644
--- a/numpy/core/setup.py
+++ b/numpy/core/setup.py
@@ -8,7 +8,7 @@ from distutils.dep_util import newer,newer_group
def configuration(parent_package='',top_path=None):
from numpy.distutils.misc_util import Configuration,dot_join
- from numpy.distutils.system_info import get_info
+ from numpy.distutils.system_info import get_info, default_lib_dirs
config = Configuration('core',parent_package,top_path)
local_dir = config.local_path
@@ -31,7 +31,8 @@ def configuration(parent_package='',top_path=None):
tc = generate_testcode(target)
from distutils import sysconfig
python_include = sysconfig.get_python_inc()
- result = config_cmd.try_run(tc,include_dirs=[python_include])
+ result = config_cmd.try_run(tc,include_dirs=[python_include],
+ library_dirs = default_lib_dirs)
if not result:
raise "ERROR: Failed to test configuration"
moredefs = []
diff --git a/numpy/core/src/arraytypes.inc.src b/numpy/core/src/arraytypes.inc.src
index 16f7057c5..638318fd1 100644
--- a/numpy/core/src/arraytypes.inc.src
+++ b/numpy/core/src/arraytypes.inc.src
@@ -1648,17 +1648,13 @@ OBJECT_fill(PyObject **buffer, intp length, void *ignored)
static void
@NAME@_fill(@typ@ *buffer, intp length, void *ignored)
{
- @typ@ *buffermax;
+ register intp i;
@typ@ start = buffer[0];
@typ@ delta = buffer[1];
delta -= start;
- start += (delta + delta);
- buffermax = buffer + length;
buffer += 2;
- while(buffer < buffermax) {
- *buffer = start;
- start += delta;
- buffer++;
+ for (i=2; i<length; i++, buffer++) {
+ *buffer = start + i*delta;
}
}
/**end repeat**/
@@ -1670,9 +1666,9 @@ static void
static void
@NAME@_fill(@typ@ *buffer, intp length, void *ignored)
{
+ register intp i;
@typ@ start;
@typ@ delta;
- @typ@ *buffermax;
start.real = buffer->real;
start.imag = buffer->imag;
@@ -1680,16 +1676,10 @@ static void
delta.imag = buffer[1].imag;
delta.real -= start.real;
delta.imag -= start.imag;
- start.real += (delta.real + delta.real);
- start.imag += (delta.imag + delta.imag);
- buffermax = buffer + length;
buffer += 2;
- while (buffer < buffermax) {
- buffer->real = start.real;
- buffer->imag = start.imag;
- start.real += delta.real;
- start.imag += delta.imag;
- buffer++;
+ for (i=2; i<length; i++, buffer++) {
+ buffer->real = start.real + i*delta.real;
+ buffer->imag = start.imag + i*delta.imag;
}
}
/**end repeat**/
diff --git a/numpy/distutils/system_info.py b/numpy/distutils/system_info.py
index a7230956c..e555d83f2 100644
--- a/numpy/distutils/system_info.py
+++ b/numpy/distutils/system_info.py
@@ -116,7 +116,8 @@ from distutils.sysconfig import get_config_vars
if sys.platform == 'win32':
default_lib_dirs = ['C:\\',
- os.path.join(distutils.sysconfig.EXEC_PREFIX, 'libs')]
+ os.path.join(distutils.sysconfig.EXEC_PREFIX,
+ 'libs')]
default_include_dirs = []
default_src_dirs = ['.']
default_x11_lib_dirs = []
diff --git a/numpy/random/setup.py b/numpy/random/setup.py
index 6dc1f1873..bc9d4f059 100644
--- a/numpy/random/setup.py
+++ b/numpy/random/setup.py
@@ -16,7 +16,6 @@ def configuration(parent_package='',top_path=None):
if config_cmd.try_run(tc):
libs.append('Advapi32')
ext.libraries.extend(libs)
- print "**** got ", libs
return None
libs = []