Skip to content

Commit

Permalink
Shape
Browse files Browse the repository at this point in the history
  • Loading branch information
KexinFeng committed Jun 8, 2023
1 parent dab75c9 commit 6c3d3e0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions api/src/main/java/ai/djl/ndarray/types/Shape.java
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ public long[] getShape() {
* @return the shape in the given dimension
*/
public long get(int dimension) {
dimension = dimension + (dimension < 0 ? shape.length : 0);
return shape[dimension];
}

Expand Down

0 comments on commit 6c3d3e0

Please sign in to comment.