1

enter image description here

Error while using numpy random function, it shows int object not callable please suggest alternative

2 Answers 2

2

You missed out on the second comma while passing arguments to np.random.random_integers (here: (100(3,4))), so it assumes 100 is a function to which you're passing arguments 3 and 4, which is not the case as 100 is an integer.

Change

np.random.random_integers(50, 100(3,4))

to

np.random.random_integers(50, 100, (3, 4))
Sign up to request clarification or add additional context in comments.

1 Comment

Thanx Shreya 👍🏼👍🏼
0
xx=np.random.random_integers(50,100(3,4))

please suggest alternative

As an alternative I suggest to insert the missing comma:

xx = np.random.random_integers(50, 100, (3, 4))

1 Comment

Thanx Ramai 👍👍

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.