ESBMC
Efficient SMT-based Context-Bounded Model Checker
Loading...
Searching...
No Matches
ndarray_shape.h File Reference
#include <vector>
Include dependency graph for ndarray_shape.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void validate_ndarray_shape (const std::vector< long long > &shape)
 Validates a shape vector on its own, ahead of building the backing buffer (e.g.

Function Documentation

◆ validate_ndarray_shape()

void validate_ndarray_shape ( const std::vector< long long > & shape)

Validates a shape vector on its own, ahead of building the backing buffer (e.g.

for np.zeros/np.ones/np.full call sites). Throws std::runtime_error with a NumPy-compatible ValueError message when a dimension is negative or the element count overflows.