Commit 8dad989
committed
Fix random state regeneration logic in RandomState
Updated the _ensure_value_exists method to properly check the type of self._value and only regenerate the random state if it is not a numpy array, not a JAX Tracer, and has been deleted. This prevents unnecessary regeneration and ensures correct handling of different value types.1 parent 8d924dd commit 8dad989
1 file changed
Lines changed: 6 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
546 | 546 | | |
547 | 547 | | |
548 | 548 | | |
| 549 | + | |
549 | 550 | | |
550 | 551 | | |
551 | | - | |
| 552 | + | |
552 | 553 | | |
553 | | - | |
554 | | - | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
555 | 558 | | |
556 | 559 | | |
557 | 560 | | |
| |||
0 commit comments