The function fftconvolve in helper_functions.py has two inputs. These are turned into arrays with asarray()
and next a test is done on them:
if matrix_rank(in1) == matrix_rank(in2) == 0: # scalar inputs
return in1 * in2
I am not sure what this test is but if the inputs are 3D arrays python complains that matrix_rank(in1) and matrix_rank(in2) are arrays and therefore cannot be compared like this ("The truth value of an array with more than one element is ambiguous."). Therefore the routine does not work.
The intended meaning of this test seems to catch the case where the inputs are not arrays but scalars. However, I am not sure this is the way to test this. matrix_rank(asarray([5]) returns 1, not 0. Perhaps the intended use was different??
The function fftconvolve in helper_functions.py has two inputs. These are turned into arrays with asarray() and next a test is done on them:
if matrix_rank(in1) == matrix_rank(in2) == 0: # scalar inputs return in1 * in2 I am not sure what this test is but if the inputs are 3D arrays python complains that matrix_rank(in1) and matrix_rank(in2) are arrays and therefore cannot be compared like this ("The truth value of an array with more than one element is ambiguous."). Therefore the routine does not work.
The intended meaning of this test seems to catch the case where the inputs are not arrays but scalars. However, I am not sure this is the way to test this. matrix_rank(asarray([5]) returns 1, not 0. Perhaps the intended use was different??