June 2015
Beginner
348 pages
8h 44m
English
To demonstrate how the at() method works, start a Python or IPython shell and import NumPy. You should know how to do this by now.
-3 to 3 with a seed of 42:>>> a = np.random.random_integers(-3, 3, 7) >>> a array([ 1, 0, -1, 2, 1, -2, 0])
When we talk about random numbers in programming, we usually talk about pseudo-random numbers (see https://www.khanacademy.org/computing/computer-science/cryptography/crypt/v/random-vs-pseudorandom-number-generators). The numbers appear random, but in fact are calculated using a seed.
at() method of the sign() universal function to the fourth and sixth array elements:
>>> np.sign.at(a, ...Read now
Unlock full access