# HG changeset patch # User jwe # Date 781838211 0 # Node ID 5148e500c2fbd6618c923e6485e7defc6f80076f # Parent c5d35bb139b6606cf8407975fa4329d38b56cc47 [project @ 1994-10-11 01:16:51 by jwe] diff --git a/src/pt-exp-base.cc b/src/pt-exp-base.cc --- a/src/pt-exp-base.cc +++ b/src/pt-exp-base.cc @@ -2387,10 +2387,13 @@ else error ("%s: unable to handle real arguments", m_fcn.name); } - else if (arg.is_matrix_type ()) + else { Matrix m = arg.matrix_value (); + if (error_state) + return retval; + if (m_fcn.can_return_complex_for_real_arg && (any_element_less_than (m, m_fcn.lower_limit) || any_element_greater_than (m, m_fcn.upper_limit))) @@ -2405,8 +2408,6 @@ else error ("%s: unable to handle real arguments", m_fcn.name); } - else - gripe_wrong_type_arg ("mapper", arg); } else if (arg.is_complex_type ()) { @@ -2421,10 +2422,13 @@ else error ("%s: unable to handle complex arguments", m_fcn.name); } - else if (arg.is_matrix_type ()) + else { ComplexMatrix cm = arg.complex_matrix_value (); + if (error_state) + return retval; + if (m_fcn.d_c_mapper) retval = map (m_fcn.d_c_mapper, cm); else if (m_fcn.c_c_mapper) @@ -2432,8 +2436,6 @@ else error ("%s: unable to handle complex arguments", m_fcn.name); } - else - gripe_wrong_type_arg ("mapper", arg); } else gripe_wrong_type_arg ("mapper", arg);