jeudi 28 mai 2020

numpy random matrix with bounds along each axis

with

a = numpy.random.randomint(lo,hi,(m,n))

I can create a numpy matrix of size m, populated with random values between 'hi' and 'lo'.

Is there a way to create a numpy matrix with say random values such that

along column 1 I have numbers btween 'hi1', 'lo1' and

along column 2 I have numbers between 'hi2' and 'lo2' etc.

i.e. each column will have its own hi,low.

Any help will be much appreciated.




Aucun commentaire:

Enregistrer un commentaire