MCPcopy Create free account
hub / github.com/numpy/numpy / __getitem__

Method __getitem__

numpy/f2py/symbolic.py:575–583  ·  view source on GitHub ↗
(self, index)

Source from the content-addressed store, hash-verified

573 **dict((k, as_expr(v)) for k, v in kwargs.items()))
574
575 def __getitem__(self, index):
576 # Provided to support C indexing operations that .pyf files
577 # may contain.
578 index = as_expr(index)
579 if not isinstance(index, tuple):
580 index = index,
581 if len(index) > 1:
582 ewarn(f'C-index should be a single expression but got `{index}`')
583 return Expr(Op.INDEXING, (self,) + index)
584
585 def substitute(self, symbols_map):
586 """Recursively substitute symbols with values in symbols map.

Callers

nothing calls this directly

Calls 3

as_exprFunction · 0.85
ewarnFunction · 0.85
ExprClass · 0.85

Tested by

no test coverage detected