Skip to content

Commit

Permalink
Adding the [] accessor
Browse files Browse the repository at this point in the history
  • Loading branch information
cpetersen committed Mar 14, 2024
1 parent f1585a8 commit c9ad1f3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ext/candle/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ fn init(ruby: &Ruby) -> RbResult<()> {
rb_tensor.define_method("squeeze", method!(RbTensor::squeeze, 1))?;
rb_tensor.define_method("unsqueeze", method!(RbTensor::unsqueeze, 1))?;
rb_tensor.define_method("get", method!(RbTensor::get, 1))?;
rb_tensor.define_method("[]", method!(RbTensor::get, 1))?;
rb_tensor.define_method("transpose", method!(RbTensor::transpose, 2))?;
rb_tensor.define_method("narrow", method!(RbTensor::narrow, 3))?;
rb_tensor.define_method("argmax_keepdim", method!(RbTensor::argmax_keepdim, 1))?;
Expand Down

0 comments on commit c9ad1f3

Please sign in to comment.