I have this code from scikit docs:
import numpy as np
np.random.seed(1)
I understand what this code does semantically, but I cannot understand what this code actually calls.
Ok, numpy is a name of python module and np is just an alias for that. But what is np.random? Is it module inside of another module?
I found source code on GitHub and random is just a folder inside of numpy directory. So numpy should be a package, not a module?
Numpy
is a package, that contains modulerandom
which contains methodseed
.