Locos certainly, but I don’t think cargo ships are commonly diesel/electric. Some cruise liners are and it’s becoming more common, not because it’s mechanically efficient but because it allows you to use engines for propulsion, “hotel” power and any desired combination thereof.