'Matrix With X Lines and Y Colums and Random Numbers in python
Im doing a project for Uni in python, and i want to creat a matrix with X number of lines and Y number of colums and all the numbers would be between 0 and 1 (int). I did some code but it's not working properly and i don't know how to fix it.
import numpy as np
import random
x=int(input(print('l?')))
y=int(input(print('c?')))
R=np.random.ranint(2,size(x,y))
It's always showing this type of error : AttributeError: module 'numpy.random' has no attribute 'ranint'
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
