While calculating center why we used -1

while calculating center why we used -1

Hey @hssharma2212000, np.radom.random() gives us numbers in range from [0.0,1.0).
So first we multiplied it by 2, now new range would be [0.0, 2). You will see here, we didn’t cover negative range here.

So now we subtract 1 from this. new range would be [-1.0,1).
And finally we multiplied it by 10. to get numbers in range between [-10.0,10.0)

Hope this resolved your doubt.
Plz mark it as resolved :blush:

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.