fix array shape when computing gradient for guess and slip