On Tuesday, March 12, 2013 2:59:29 PM UTC-7, Oscar Benjamin wrote:
> On 12 March 2013 20:21, llanitedave wrote:
>
> > On Tuesday, March 12, 2013 10:47:25 AM UTC-7, Maarten wrote:
>
> >> On Tuesday, March 12, 2013 6:11:10 PM UTC+1, Norah Jones wrote:
>
> >>
>
> >> > I want to create a random fl
On 12 March 2013 20:21, llanitedave wrote:
> On Tuesday, March 12, 2013 10:47:25 AM UTC-7, Maarten wrote:
>> On Tuesday, March 12, 2013 6:11:10 PM UTC+1, Norah Jones wrote:
>>
>> > I want to create a random float array of size 100, with the values in the
>> > array ranging from 0 to 5. I have tri
On 03/12/2013 01:11 PM, Norah Jones wrote:
I want to create a random float array of size 100, with the values in the array
ranging from 0 to 5. I have tried random.sample(range(5),100) but that does not
work. How can i get what i want to achieve?
None of the responses so far actually give y
On Tuesday, March 12, 2013 10:47:25 AM UTC-7, Maarten wrote:
> On Tuesday, March 12, 2013 6:11:10 PM UTC+1, Norah Jones wrote:
>
> > I want to create a random float array of size 100, with the values in the
> > array ranging from 0 to 5. I have tried random.sample(range(5),100) but
> > that does
On Tuesday, March 12, 2013 6:11:10 PM UTC+1, Norah Jones wrote:
> I want to create a random float array of size 100, with the values in the
> array ranging from 0 to 5. I have tried random.sample(range(5),100) but that
> does not work. How can i get what i want to achieve?
Use numpy
import nump
On 03/12/2013 10:11 AM, Norah Jones wrote:
I want to create a random float array of size 100, with the values in
the array ranging from 0 to 5. I have tried
random.sample(range(5),100) but that does not work. How can i get what
i want to achieve?
>>> [random.uniform(0,5) for i in range(10
You can use [random.random() * 5 for x in range(100)] but works only
on range [0, 5). If you want to include 5, you will need more code.
Cheers,
FELD Boris
2013/3/12 Norah Jones :
> I want to create a random float array of size 100, with the values in the
> array ranging from 0 to 5. I have tried
I want to create a random float array of size 100, with the values in the array
ranging from 0 to 5. I have tried random.sample(range(5),100) but that does not
work. How can i get what i want to achieve?
--
http://mail.python.org/mailman/listinfo/python-list