BUG: solves complex array clip in issue #5354 and added regression test