(self, key)
| 148 | self._graph = graph |
| 149 | |
| 150 | def __getitem__(self, key): |
| 151 | if isinstance(key, slice): |
| 152 | # slice |
| 153 | if not ( |
| 154 | key.start is None and key.stop is None and key.step is None |
| 155 | ): |
| 156 | raise DGLError('Currently only full slice ":" is supported') |
| 157 | edges = ALL |
| 158 | etype = None |
| 159 | elif key is None: |
| 160 | edges = ALL |
| 161 | etype = None |
| 162 | elif isinstance(key, tuple): |
| 163 | if len(key) == 3: |
| 164 | edges = ALL |
| 165 | etype = key |
| 166 | else: |
| 167 | edges = key |
| 168 | etype = None |
| 169 | elif isinstance(key, str): |
| 170 | edges = ALL |
| 171 | etype = key |
| 172 | else: |
| 173 | edges = key |
| 174 | etype = None |
| 175 | return EdgeSpace(data=HeteroEdgeDataView(self._graph, etype, edges)) |
| 176 | |
| 177 | def __call__(self, *args, **kwargs): |
| 178 | """Return all the edges.""" |
nothing calls this directly
no test coverage detected