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

Method __setitem__

numpy/ma/tests/test_subclassing.py:122–125  ·  view source on GitHub ↗
(self, item, value)

Source from the content-addressed store, hash-verified

120 return value
121
122 def __setitem__(self, item, value):
123 # validation ensures direct assignment with ndarray or
124 # masked_print_option will fail
125 super().__setitem__(item, self._validate_input(value))
126
127 def __getitem__(self, item):
128 # ensure getter returns our own class also for scalars

Callers

nothing calls this directly

Calls 2

_validate_inputMethod · 0.95
__setitem__Method · 0.45

Tested by

no test coverage detected