|
| static bool | is_random_call (const nlohmann::json &call, const nlohmann::json &ast) |
| static std::optional< std::vector< std::size_t > > | output_shape (const nlohmann::json &call, const nlohmann::json &ast) |
| | The literal output shape of a random call that returns an array, read from the source; nullopt for a scalar result or a shape it rejects.
|
| static std::string | list_annotation (const nlohmann::json &call, const nlohmann::json &ast) |
| | "list" for a random call that returns an array, so the annotator types it and arithmetic on it as it does a numpy constructor's result; empty for a scalar.
|
np.random.
<name>(...) as a nondeterministic over-approximation (ADR-NP-002): each sample is a fresh symbol constrained to the support of its distribution. Probabilities, uniformity and generator state are not modelled. Arguments are evaluated once, in source order, and validated before any sample is drawn.