In chapter 37 of Life of Pi, Pi is aboard the lifeboat after the sinking of the Tsimtsum and sees the tiger, Richard Parker, struggling through the water. He is initially pleased that the tiger has survived, and Pi encourages him to swim for his life. He even throws the tiger a lifebuoy to keep him afloat. Pi is just about to pull Richard Parker onto the boat to safety, when it suddenly occurs to him that safety for the tiger means great danger for him, since he will be sharing the lifeboat with a ferocious predator. He wonders if he has gone mad and quickly tries to push the tiger away from the boat with an oar.
It is too late for Pi to change his mind, however. Richard Parker climbs onto the boat, and Pi promptly throws himself overboard. When he is in the water, he sees a shark's fin and returns to the boat, preferring to risk an encounter with a tiger than one with a shark. Richard Parker does not kill Pi, and the tiger arguably keeps him alive and sane throughout his ordeal. Nonetheless, at this point in the narrative, there is every reason for Pi to think that the tiger will attack him, a likelihood which raises the level of danger in which he finds himself to a pitch of absurdity.