fix specialize and ndarray tests