Skip to content

Commit

Permalink
Update mfstructure.swift (#52)
Browse files Browse the repository at this point in the history
  • Loading branch information
hartwoolery authored Mar 8, 2024
1 parent 423282b commit 397fa33
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/Matft/core/object/mfstructure.swift
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ internal func shape2strides(_ shape: inout [Int], mforder: MfOrder) -> [Int]{
case .Row://, .None:
var prevAxisNum = shape2size(&shape)
for index in 0..<shape.count{
ret[index] = prevAxisNum / shape[index]
ret[index] = prevAxisNum / max(shape[index],1)
prevAxisNum = ret[index]
}
case .Column:
Expand Down

0 comments on commit 397fa33

Please sign in to comment.