Closed advikkabra closed 3 months ago
@certik Is this approach okay?
@Thirumalai-Shaktivel I've reverted the changes in random.py
and created another function in lfortran_intrinsics
which calls all initial setup. I think the PR is good to go.
I think the changes looks good to me. @Shaikh-Ubaid, Why don't you review this PR and share your thoughts?
Initially we can call it every time, later on we can update it to only call it if random is used.
I am concerned about calling it every time even when random()
is not used. But since we can update it later, I think it is fine.
Thanks for the review, Ubaid!
Fixes #2545 . Has a
_seed_set
variable which checks if the seed has been explicitly set by the user, else will set the default seed to the system clock.