Error while using numpy random function, it shows int object not callable please suggest alternative
Asked
Active
Viewed 104 times
2 Answers
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))

magikarp
- 460
- 1
- 8
- 22
-
Thanx Shreya – Ninad Nakhawa Jun 25 '20 at 09:08
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))

Armali
- 18,255
- 14
- 57
- 171