bug fix. gemm_impl was using template<typename Array> rank(Array&) for derived classes.

not sure about array_traits, so I just used "not is_tensor<Array>". Could be improved, I guess.