(self, array, key: tuple[Any, ...], value: Any)
| 1716 | return array[key] |
| 1717 | |
| 1718 | def _safe_setitem(self, array, key: tuple[Any, ...], value: Any) -> None: |
| 1719 | try: |
| 1720 | array[key] = value |
| 1721 | except ValueError as exc: |
| 1722 | # More informative exception if read-only view |
| 1723 | if not array.flags.writeable and not array.flags.owndata: |
| 1724 | raise ValueError( |
| 1725 | "Assignment destination is a view. " |
| 1726 | "Do you want to .copy() array first?" |
| 1727 | ) from exc |
| 1728 | else: |
| 1729 | raise exc |
| 1730 | |
| 1731 | def _oindex_set(self, indexer: OuterIndexer, value: Any) -> None: |
| 1732 | key = _outer_to_numpy_indexer(indexer, self.array.shape) |
no outgoing calls
no test coverage detected