def set_edges(self, name: str, a: np.ndarray, b: np.ndarray, w: np.ndarray, *, axis: int) -> None:
deprecated("<STR_LIT>")<EOL>try:<EOL><INDENT>g = scipy.sparse.coo_matrix((w, (a, b)), (self.shape[axis], self.shape[axis]))<EOL><DEDENT>except Exception:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>if axis == <NUM_LIT:0>:<EOL><INDENT>self.row_graphs[name] = g<EOL><DEDENT>elif axis == <NUM_LIT:1>:<EOL><INDENT>self.col_graphs[name] = g<EOL><DEDENT>else:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>
**DEPRECATED** - Use `ds.row_graphs[name] = g` or `ds.col_graphs[name] = g` instead