test = np.random.randn(0, 0.25)

I'm trying to generate a random number with a mean of 0 and variance of 0.25.

When I run it I get this error:

TypeError: 'float' object cannot be interpreted as an integer

New contributor
test test is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

closed as off-topic by D.W. Feb 11 at 17:53

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions about software development or programming tools are off-topic here, but can be asked on Stack Overflow." – D.W.
If this question can be reworded to fit the rules in the help center, please edit the question.

Browse other questions tagged or ask your own question.