An example of metaphor used in popular science writing:
"…consider a supergiant that contains ten times as much material as the Sun. Such a star would be at least a thousand times brighter than the Sun. The reason for this is that massive stars are extremely prodigal in the rate at which they consume hydrogen."
Fred Hoyle (1960) The Nature of the Universe (Revised ed.)
Prodigal means "spending or using large amounts of money, time, energy, etc., especially in a way that is not very wise" (https://dictionary.cambridge.org/dictionary/english/prodigal), so arguably this is an anthropomorphic metaphor, as only a sentient being could be wise, or act in a way that was not wise. A star does not consider practical or ethical considerations, but just reflects the laws of physics.
Read examples of anthropomorphism in science