Is the word "set" used in the same way in the following two sentences?

The set of prime numbers is infinite.

The set of his mind was obvious.
different meanings