Reputation: 41
I would like to create a function of n. I would like the function to return a zero column vector of size n.
To clarify if I choose n=3, in return I get:
np.array[[0], [0], [0]]
Upvotes: 1
Views: 5877
Reputation: 385
def f(n):
return np.array(n*[[0]])
is that the function that you need?
Upvotes: 0