[Scipy-svn] r3036 - in trunk/Lib/stsci/image: lib src
scipy-svn@scip...
scipy-svn@scip...
Wed May 23 14:15:42 CDT 2007
Author: chanley
Date: 2007-05-23 14:15:38 -0500 (Wed, 23 May 2007)
New Revision: 3036
Modified:
trunk/Lib/stsci/image/lib/_image.py
trunk/Lib/stsci/image/src/_combinemodule.c
Log:
Fixing typecasting problem and making image easier to install outside of the scipy namespace.
Modified: trunk/Lib/stsci/image/lib/_image.py
===================================================================
--- trunk/Lib/stsci/image/lib/_image.py 2007-05-23 14:38:21 UTC (rev 3035)
+++ trunk/Lib/stsci/image/lib/_image.py 2007-05-23 19:15:38 UTC (rev 3036)
@@ -1,6 +1,6 @@
import numpy as num
-import scipy.stsci.convolve as convolve
-import scipy.stsci.convolve._correlate as _correlate
+import convolve
+import convolve._correlate as _correlate
MLab=num
def _translate(a, dx, dy, output=None, mode="nearest", cval=0.0):
Modified: trunk/Lib/stsci/image/src/_combinemodule.c
===================================================================
--- trunk/Lib/stsci/image/src/_combinemodule.c 2007-05-23 14:38:21 UTC (rev 3035)
+++ trunk/Lib/stsci/image/src/_combinemodule.c 2007-05-23 19:15:38 UTC (rev 3036)
@@ -15,7 +15,7 @@
static int
-_mask_and_sort(int ninputs, int index, Float64 **inputs, Bool **masks,
+_mask_and_sort(int ninputs, int index, Float64 **inputs, UInt8 **masks,
Float64 temp[MAX_ARRAYS])
{
int i, j, goodpix;
@@ -97,7 +97,7 @@
if (dim == maxdim-1) {
Float64 sorted[MAX_ARRAYS];
Float64 *tinputs[MAX_ARRAYS];
- Bool *tmasks[MAX_ARRAYS];
+ UInt8 *tmasks[MAX_ARRAYS];
Float64 *toutput;
int cols = inputs[0]->dimensions[dim];
@@ -106,7 +106,7 @@
tinputs[i] = (Float64 *) inputs[i]->data;
if (masks) {
for(i=0; i<ninputs; i++)
- tmasks[i] = (Bool *) masks[i]->data;
+ tmasks[i] = (UInt8 *) masks[i]->data;
}
toutput = (Float64 *) output->data;
@@ -185,7 +185,7 @@
if (badmasks != Py_None) {
a = PySequence_GetItem(badmasks, i);
if (!a) return NULL;
- bmk[i] = NA_InputArray(a, tBool, C_ARRAY);
+ bmk[i] = NA_InputArray(a, tUInt8, C_ARRAY);
if (!bmk[i]) return NULL;
Py_DECREF(a);
}
More information about the Scipy-svn
mailing list