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
Answers:
The type is a numpy ndarray.
Here is how I got it:
print(type(np.random.randint(0, 10, size=(15, 2))))
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
The type is a numpy ndarray.
Here is how I got it:
print(type(np.random.randint(0, 10, size=(15, 2))))