np.nditer as an iterator object over named arrays and views (ADR-NP-003): the converter keeps its position in hidden variables and lowers every read through the operand's own subscript, in the order NumPy visits it (C, F, or K: memory order, negative strides undone).
More...
#include <numpy_nditer.h>
|
| | numpy_nditer (python_converter &converter) |
| void | create (const std::string &name, const nlohmann::json &call) |
| | name = np.nditer(...): validates the call and creates the iterator.
|
| exprt | as_list (const nlohmann::json &call) |
| | The elements a bare np.nditer(...) yields, in visiting order.
|
| bool | bind (const nlohmann::json &target, const nlohmann::json &value) |
| | target = <iterator>.
|
| std::optional< exprt > | attribute (const nlohmann::json &node) |
| std::optional< exprt > | call (const nlohmann::json &node) |
| std::optional< exprt > | read_item (const nlohmann::json &name) |
| std::optional< exprt > | subscript (const nlohmann::json &node) |
| bool | write (const nlohmann::json &target, const nlohmann::json &value) |
| | x[...] = value on what the iterator yields; false for other targets.
|
| void | keep_sources (const std::string &rebound_id, const std::string &heir_id) |
| | Before the array rebound_id names is rebound: the iterators over it keep the old storage, held by the alias heir_id when it has one.
|
|
| static bool | is_nditer_call (const nlohmann::json &node, const nlohmann::json &ast) |
| static std::string | key (const std::string &function, const std::string &name) |
np.nditer as an iterator object over named arrays and views (ADR-NP-003): the converter keeps its position in hidden variables and lowers every read through the operand's own subscript, in the order NumPy visits it (C, F, or K: memory order, negative strides undone).
◆ numpy_nditer()
◆ as_list()
| exprt numpy_nditer::as_list |
( |
const nlohmann::json & | call | ) |
|
The elements a bare np.nditer(...) yields, in visiting order.
◆ attribute()
| std::optional< exprt > numpy_nditer::attribute |
( |
const nlohmann::json & | node | ) |
|
◆ bind()
| bool numpy_nditer::bind |
( |
const nlohmann::json & | target, |
|
|
const nlohmann::json & | value ) |
target = <iterator>.
<...> forms that bind what the iterator yields; false when value is not one of them.
◆ call()
| std::optional< exprt > numpy_nditer::call |
( |
const nlohmann::json & | node | ) |
|
◆ create()
| void numpy_nditer::create |
( |
const std::string & | name, |
|
|
const nlohmann::json & | call ) |
name = np.nditer(...): validates the call and creates the iterator.
◆ is_nditer_call()
| bool numpy_nditer::is_nditer_call |
( |
const nlohmann::json & | node, |
|
|
const nlohmann::json & | ast ) |
|
static |
◆ keep_sources()
| void numpy_nditer::keep_sources |
( |
const std::string & | rebound_id, |
|
|
const std::string & | heir_id ) |
Before the array rebound_id names is rebound: the iterators over it keep the old storage, held by the alias heir_id when it has one.
◆ key()
| std::string numpy_nditer::key |
( |
const std::string & | function, |
|
|
const std::string & | name ) |
|
static |
◆ read_item()
| std::optional< exprt > numpy_nditer::read_item |
( |
const nlohmann::json & | name | ) |
|
◆ subscript()
| std::optional< exprt > numpy_nditer::subscript |
( |
const nlohmann::json & | node | ) |
|
◆ write()
| bool numpy_nditer::write |
( |
const nlohmann::json & | target, |
|
|
const nlohmann::json & | value ) |
x[...] = value on what the iterator yields; false for other targets.
The documentation for this class was generated from the following files: