Pi thinks the hyena never attacked him because the tiger was in the boat.
In the beginning, there were more 'passengers' on the ship - the hyena, a zebra, and an orangutan. However, the hyena killed the zebra and the orangutan, but never dared to actually attack Pi as well, because of his friend, the tiger named Richard Parker.