From 6b6ba412695298460fb2cae640967ebc6843a8bf Mon Sep 17 00:00:00 2001 From: Antonio Sanchez Date: Thu, 28 Oct 2021 09:28:29 -0700 Subject: [PATCH] Fix min/max nan-propagation for scalar "other". Copied input type from `EIGEN_MAKE_CWISE_BINARY_OP`. Fixes #2362. (cherry picked from commit 03d4cbb30796ea06350414f5f551b180e4864688) --- Eigen/src/plugins/ArrayCwiseBinaryOps.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Eigen/src/plugins/ArrayCwiseBinaryOps.h b/Eigen/src/plugins/ArrayCwiseBinaryOps.h index a9ddb9058..1b422e201 100644 --- a/Eigen/src/plugins/ArrayCwiseBinaryOps.h +++ b/Eigen/src/plugins/ArrayCwiseBinaryOps.h @@ -38,7 +38,7 @@ min #else (min) #endif -(const OtherDerived &other) const +(const EIGEN_CURRENT_STORAGE_BASE_CLASS &other) const { return CwiseBinaryOp, const Derived, const OtherDerived>(derived(), other.derived()); } @@ -102,7 +102,7 @@ max #else (max) #endif -(const OtherDerived &other) const +(const EIGEN_CURRENT_STORAGE_BASE_CLASS &other) const { return CwiseBinaryOp, const Derived, const OtherDerived>(derived(), other.derived()); }