Skip to content

Commit 54bf710

Browse files
SomTambemcabbott
andauthored
Update src/utils.jl
Co-authored-by: Michael Abbott <32575566+mcabbott@users.noreply.github.com>
1 parent 786eb8e commit 54bf710

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/utils.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -230,10 +230,10 @@ function orthogonal(rng::AbstractRNG, rows, cols; gain = 1)
230230
return gain * Q
231231
end
232232

233-
function orthogonal(rng::AbstractRNG, d1, ds...; kwargs...)
233+
function orthogonal(rng::AbstractRNG, d1::Integer, ds::Integer...; kwargs...)
234234
dims = (d1, ds...)
235-
rows = dims[end]
236-
cols = div(prod(dims), rows)
235+
rows = prod(dims[1:end-1])
236+
cols = dims[end]
237237
return reshape(orthogonal(rng, rows, cols; kwargs...), dims)
238238
end
239239

0 commit comments

Comments
 (0)