What data type is returned from the numpy function

Question:

p = np.random.randint(0, 10, size=(15, 2))

what is the type of data returned. I am trying to recreate this.

my list which im trying to replicate returns (ignore the values ofc) =

[[10,10],[10,22]]

How im appending >> mylst.append([int,int1])

Im trying to figure out how to return it with the same format so it allows me to make easy calls such as

print(p[:,0])

cant figure out the data type

Asked By: SocketLearner1302

||

Answers:

The type is a numpy ndarray.

Here is how I got it:

print(type(np.random.randint(0, 10, size=(15, 2))))
Answered By: Dax
Categories: questions Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.