Fix bug in array padding, template matching

This commit is contained in:
Johannes Schönberger
2013-12-08 18:54:02 +01:00
parent cff007827c
commit 783c04baec
8 changed files with 108 additions and 154 deletions
+5 -1
View File
@@ -1027,7 +1027,11 @@ def _normalize_shape(narray, shape):
"""
normshp = None
shapelen = len(np.shape(narray))
if (isinstance(shape, int)) or shape is None:
if isinstance(shape, np.ndarray):
shape = shape.tolist()
if isinstance(shape, (int, float)) or shape is None:
normshp = ((shape, shape), ) * shapelen
elif (isinstance(shape, (tuple, list))
and isinstance(shape[0], (tuple, list))