Skip to content

Commit a442f12

Browse files
committed
Replace transpose by permutedims in pairwise (avoid issues with Zygote)
1 parent b1a4510 commit a442f12

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/distances/pairwise.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Add our own pairwise function to be able to apply it on vectors
22

3-
pairwise(d::PreMetric, X::AbstractVector, Y::AbstractVector) = broadcast(d, X, Y')
3+
pairwise(d::PreMetric, X::AbstractVector, Y::AbstractVector) = broadcast(d, X, permutedims(Y))
44

55
pairwise(d::PreMetric, X::AbstractVector) = pairwise(d, X, X)
66

0 commit comments

Comments
 (0)