ndimage.filters: simplify nonzero template for CUDA code
@@ -172,12 +172,7 @@ typename std::enable_if<(std::is_floating_point<A>::value
cast(A a) { return (a >= 0) ? (B)a : -(B)(-a); }
template <class T>
-__device__ __forceinline__ bool nonzero(T x) { return x!=0; }
-
-template <typename T>
-__device__ __forceinline__ bool nonzero(complex<T> x) {
- return x.real() || x.imag();
-}
+__device__ __forceinline__ bool nonzero(T x) { return x != static_cast<T>(0); }
"""
