Extend the feature data. The operation triggers index selection. Parameters ---------- feats : Tensor The new features. feat_scheme : Scheme, optional The scheme
(self, feats, feat_scheme=None)
| 390 | self.data = F.scatter_row(self.data, rowids, feats) |
| 391 | |
| 392 | def extend(self, feats, feat_scheme=None): |
| 393 | """Extend the feature data. |
| 394 | |
| 395 | The operation triggers index selection. |
| 396 | |
| 397 | Parameters |
| 398 | ---------- |
| 399 | feats : Tensor |
| 400 | The new features. |
| 401 | feat_scheme : Scheme, optional |
| 402 | The scheme |
| 403 | """ |
| 404 | if feat_scheme is None: |
| 405 | feat_scheme = infer_scheme(feats) |
| 406 | |
| 407 | if feat_scheme != self.scheme: |
| 408 | raise DGLError( |
| 409 | "Cannot update column of scheme %s using feature of scheme %s." |
| 410 | % (feat_scheme, self.scheme) |
| 411 | ) |
| 412 | |
| 413 | self.data = F.cat([self.data, feats], dim=0) |
| 414 | |
| 415 | def clone(self): |
| 416 | """Return a shallow copy of this column.""" |