Skip to content

Commit

Permalink
small code clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
abeschneider committed Jan 9, 2017
1 parent 2087d82 commit e5406db
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Sources/Tensor/tensor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -599,8 +599,7 @@ public func copy<StorageType:Storage>(from:[[StorageType.ElementType]], to:Tenso
public func copy<StorageType:Storage>(from:Tensor<StorageType>, to:Tensor<StorageType>) {
precondition(to.shape == from.shape, "Destination and source must be the same size")

let zippedIndices = zip(from.indices(), to.indices())
for (i, j) in zippedIndices {
for (i, j) in zip(from.indices(), to.indices()) {
to[j] = from[i]
}
}
Expand Down

0 comments on commit e5406db

Please sign in to comment.