make sure dimensions match in complex(). fixes #3090